mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 05:04:33 +02:00
Merge branch 'bugfix/cxx_gpio_explicit_constructor' into 'master'
bugfix (cxx)!: added missing explicit for some strong value types Closes IDF-4234 See merge request espressif/esp-idf!16015
This commit is contained in:
@@ -46,7 +46,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @throw GPIOException if the number does not reflect a valid GPIO number on the current hardware.
|
* @throw GPIOException if the number does not reflect a valid GPIO number on the current hardware.
|
||||||
*/
|
*/
|
||||||
GPIONumBase(uint32_t pin) : StrongValueComparable<uint32_t>(pin)
|
explicit GPIONumBase(uint32_t pin) : StrongValueComparable<uint32_t>(pin)
|
||||||
{
|
{
|
||||||
esp_err_t pin_check_result = check_gpio_pin_num(pin);
|
esp_err_t pin_check_result = check_gpio_pin_num(pin);
|
||||||
if (pin_check_result != ESP_OK) {
|
if (pin_check_result != ESP_OK) {
|
||||||
@@ -93,7 +93,7 @@ private:
|
|||||||
*
|
*
|
||||||
* @param pull_mode A valid numerical respresentation of the pull up configuration. Must be valid!
|
* @param pull_mode A valid numerical respresentation of the pull up configuration. Must be valid!
|
||||||
*/
|
*/
|
||||||
GPIOPullMode(uint32_t pull_mode) : StrongValueComparable<uint32_t>(pull_mode) { }
|
explicit GPIOPullMode(uint32_t pull_mode) : StrongValueComparable<uint32_t>(pull_mode) { }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
@@ -137,7 +137,7 @@ private:
|
|||||||
*
|
*
|
||||||
* @param pull_mode A valid numerical respresentation of a possible interrupt level to wake up. Must be valid!
|
* @param pull_mode A valid numerical respresentation of a possible interrupt level to wake up. Must be valid!
|
||||||
*/
|
*/
|
||||||
GPIOWakeupIntrType(uint32_t interrupt_level) : StrongValueComparable<uint32_t>(interrupt_level) { }
|
explicit GPIOWakeupIntrType(uint32_t interrupt_level) : StrongValueComparable<uint32_t>(interrupt_level) { }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static GPIOWakeupIntrType LOW_LEVEL();
|
static GPIOWakeupIntrType LOW_LEVEL();
|
||||||
@@ -170,7 +170,7 @@ public:
|
|||||||
* static creation functions below.
|
* static creation functions below.
|
||||||
* @throws GPIOException if the supplied number is out of the hardware capable range.
|
* @throws GPIOException if the supplied number is out of the hardware capable range.
|
||||||
*/
|
*/
|
||||||
GPIODriveStrength(uint32_t strength) : StrongValueComparable<uint32_t>(strength)
|
explicit GPIODriveStrength(uint32_t strength) : StrongValueComparable<uint32_t>(strength)
|
||||||
{
|
{
|
||||||
esp_err_t strength_check_result = check_gpio_drive_strength(strength);
|
esp_err_t strength_check_result = check_gpio_drive_strength(strength);
|
||||||
if (strength_check_result != ESP_OK) {
|
if (strength_check_result != ESP_OK) {
|
||||||
|
@@ -57,7 +57,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @throw SPIException if the passed SPI host number is incorrect.
|
* @throw SPIException if the passed SPI host number is incorrect.
|
||||||
*/
|
*/
|
||||||
SPINum(uint32_t host_id_raw) : StrongValueComparable<uint32_t>(host_id_raw)
|
explicit SPINum(uint32_t host_id_raw) : StrongValueComparable<uint32_t>(host_id_raw)
|
||||||
{
|
{
|
||||||
esp_err_t spi_num_check_result = check_spi_num(host_id_raw);
|
esp_err_t spi_num_check_result = check_spi_num(host_id_raw);
|
||||||
if (spi_num_check_result != ESP_OK) {
|
if (spi_num_check_result != ESP_OK) {
|
||||||
|
Reference in New Issue
Block a user