fix: Eliminating unused gpio function warnings
This commit is contained in:
parent
a321da8fb6
commit
98b984b17b
|
@ -14,6 +14,10 @@
|
||||||
#define __WEAK __attribute__((weak))
|
#define __WEAK __attribute__((weak))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef __UNUSED
|
||||||
|
#define __UNUSED __attribute__((unused))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GPIO_PIN_REG_0 PERIPHS_IO_MUX_GPIO0_U
|
#define GPIO_PIN_REG_0 PERIPHS_IO_MUX_GPIO0_U
|
||||||
#define GPIO_PIN_REG_1 PERIPHS_IO_MUX_U0TXD_U
|
#define GPIO_PIN_REG_1 PERIPHS_IO_MUX_U0TXD_U
|
||||||
#define GPIO_PIN_REG_2 PERIPHS_IO_MUX_GPIO2_U
|
#define GPIO_PIN_REG_2 PERIPHS_IO_MUX_GPIO2_U
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "esp8266/pin_mux_register.h"
|
#include "esp8266/pin_mux_register.h"
|
||||||
|
|
||||||
|
|
||||||
__STATIC_INLINE void GPIO_FUNCTION_SET(int io_num)
|
__STATIC_INLINE __UNUSED void GPIO_FUNCTION_SET(int io_num)
|
||||||
{
|
{
|
||||||
gpio_pin_reg_t pin_reg;
|
gpio_pin_reg_t pin_reg;
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ __STATIC_INLINE void GPIO_FUNCTION_SET(int io_num)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void GPIO_SET_DIRECTION_NORMAL_OUT(int io_num)
|
__UNUSED static void GPIO_SET_DIRECTION_NORMAL_OUT(int io_num)
|
||||||
{
|
{
|
||||||
GPIO.enable_w1ts |= (0x1 << io_num);
|
GPIO.enable_w1ts |= (0x1 << io_num);
|
||||||
// PP out
|
// PP out
|
||||||
|
@ -37,13 +37,13 @@ static void GPIO_SET_DIRECTION_NORMAL_OUT(int io_num)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
__STATIC_INLINE void GPIO_SET_LEVEL_HIGH(int io_num)
|
__STATIC_INLINE __UNUSED void GPIO_SET_LEVEL_HIGH(int io_num)
|
||||||
{
|
{
|
||||||
GPIO.out_w1ts |= (0x1 << io_num);
|
GPIO.out_w1ts |= (0x1 << io_num);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__STATIC_INLINE void GPIO_SET_LEVEL_LOW(int io_num)
|
__STATIC_INLINE __UNUSED void GPIO_SET_LEVEL_LOW(int io_num)
|
||||||
{
|
{
|
||||||
GPIO.out_w1tc |= (0x1 << io_num);
|
GPIO.out_w1tc |= (0x1 << io_num);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue