mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-31 15:41:02 +08:00
fix: Fixing lots of compilation warnings
- fix(esp8266): - Adding includes for missing symbols. - Removing unused variables. - Skip unsupported packing pragmas. - Add rom_functions.h for symbols that come from the ESP ROM. Add attributes on ets_printf so GCC will check the syntax of the formatting string and types of the arguments. - Add ETS_GPIO_INTR_EN(DIS)ABLE macro. - Use gpio_output_conf instead of gpio_output_set. - fix(freertos): - Define functions that are useful. - Use correct printf symbols when printing. - fix(lwip): - Ignore the warning in sntp. - fix(mqtt): - `xTicksToWait` is unsigned, can't check for less than zero. Remove unused variables. - fix(newlib): - `_free_r()` returns `void`, not `void *`. - Adding includes for missing symbols. - fix(ssl): - Make sure functions always return a value. Merges https://github.com/espressif/ESP8266_RTOS_SDK/pull/188
This commit is contained in:

committed by
Wu Jian Gang

parent
74e972880c
commit
f82e9be787
@ -29,6 +29,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "esp8266/gpio_register.h"
|
||||
|
||||
#define ETS_GPIO_INTR_ENABLE() _xt_isr_unmask(1 << ETS_GPIO_INUM)
|
||||
#define ETS_GPIO_INTR_DISABLE() _xt_isr_mask(1 << ETS_GPIO_INUM)
|
||||
|
||||
#define GPIO_Pin_0 (BIT(0)) /* Pin 0 selected */
|
||||
#define GPIO_Pin_1 (BIT(1)) /* Pin 1 selected */
|
||||
#define GPIO_Pin_2 (BIT(2)) /* Pin 2 selected */
|
||||
|
@ -29,16 +29,16 @@
|
||||
#endif
|
||||
|
||||
#define I2C_MASTER_SDA_HIGH_SCL_HIGH() \
|
||||
gpio_output_set(1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 0, 1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 0)
|
||||
gpio_output_conf(1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 0, 1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 0)
|
||||
|
||||
#define I2C_MASTER_SDA_HIGH_SCL_LOW() \
|
||||
gpio_output_set(1<<I2C_MASTER_SDA_GPIO, 1<<I2C_MASTER_SCL_GPIO, 1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 0)
|
||||
gpio_output_conf(1<<I2C_MASTER_SDA_GPIO, 1<<I2C_MASTER_SCL_GPIO, 1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 0)
|
||||
|
||||
#define I2C_MASTER_SDA_LOW_SCL_HIGH() \
|
||||
gpio_output_set(1<<I2C_MASTER_SCL_GPIO, 1<<I2C_MASTER_SDA_GPIO, 1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 0)
|
||||
gpio_output_conf(1<<I2C_MASTER_SCL_GPIO, 1<<I2C_MASTER_SDA_GPIO, 1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 0)
|
||||
|
||||
#define I2C_MASTER_SDA_LOW_SCL_LOW() \
|
||||
gpio_output_set(0, 1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 0)
|
||||
gpio_output_conf(0, 1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 1<<I2C_MASTER_SDA_GPIO | 1<<I2C_MASTER_SCL_GPIO, 0)
|
||||
|
||||
/** \defgroup Driver_APIs Driver APIs
|
||||
* @brief Driver APIs
|
||||
|
@ -126,8 +126,6 @@ typedef enum
|
||||
SpiPinCS_2 = 2,
|
||||
} SpiPinCS;
|
||||
|
||||
#pragma pack (1)
|
||||
|
||||
/**
|
||||
* @brief SPI attribute
|
||||
*/
|
||||
@ -152,8 +150,6 @@ typedef struct
|
||||
uint8_t dataLen; ///< Data byte length.
|
||||
} SpiData;
|
||||
|
||||
#pragma upack (1)
|
||||
|
||||
#define SHOWREG() __ShowRegValue(__func__, __LINE__);
|
||||
|
||||
/**
|
||||
@ -325,4 +321,4 @@ void SPIIntClear(SpiNum spiNum);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __SPI_INTERFACE_H__
|
||||
#endif // __SPI_INTERFACE_H__
|
||||
|
17
components/esp8266/include/esp8266/rom_functions.h
Normal file
17
components/esp8266/include/esp8266/rom_functions.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef _ROM_FUNCTIONS_H
|
||||
#define _ROM_FUNCTIONS_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
uint32_t Wait_SPI_Idle();
|
||||
|
||||
void uart_div_modify(uint32_t uart_no, uint32_t baud_div);
|
||||
|
||||
void ets_delay_us(uint32_t us);
|
||||
int ets_printf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
|
||||
|
||||
void system_soft_wdt_feed();
|
||||
|
||||
void Cache_Read_Enable_New();
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user