release-0.5.0 #31
@@ -298,6 +298,8 @@ static esp_err_t relay_chn_create_event_loop()
|
|||||||
|
|
||||||
esp_err_t relay_chn_create(const gpio_num_t* gpio_map, uint8_t gpio_count)
|
esp_err_t relay_chn_create(const gpio_num_t* gpio_map, uint8_t gpio_count)
|
||||||
{
|
{
|
||||||
|
ESP_RETURN_ON_FALSE(gpio_map, ESP_ERR_INVALID_ARG, TAG, "gpio_map cannot be NULL");
|
||||||
|
|
||||||
// Check if the device's GPIOs are enough for the number of channels
|
// Check if the device's GPIOs are enough for the number of channels
|
||||||
if (RELAY_CHN_COUNT > (GPIO_PIN_COUNT / 2)) {
|
if (RELAY_CHN_COUNT > (GPIO_PIN_COUNT / 2)) {
|
||||||
ESP_LOGE(TAG, "Not enough GPIOs for the number of channels!");
|
ESP_LOGE(TAG, "Not enough GPIOs for the number of channels!");
|
||||||
|
|||||||
Reference in New Issue
Block a user