feat(driver): Clean up header files dependency

This commit is contained in:
Wu Jian Gang
2018-05-19 23:49:26 +08:00
parent 78bdcf043e
commit 3c560f678a
8 changed files with 49 additions and 18 deletions

View File

@ -12,8 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "esp_common.h"
#include "freertos/portmacro.h"
#include <stdint.h>
#include "esp8266/eagle_soc.h"
#include "esp8266/pin_mux_register.h"
#include "FreeRTOS.h"
#include "gpio.h"

View File

@ -12,8 +12,15 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "esp_common.h"
#include "freertos/portmacro.h"
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "esp8266/ets_sys.h"
#include "esp8266/eagle_soc.h"
#include "esp8266/timer_register.h"
#include "FreeRTOS.h"
#define US_TO_RTC_TIMER_TICKS(t) \
((t) ? \

View File

@ -12,14 +12,17 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "c_types.h"
#include <stdint.h>
#include <stdbool.h>
#include "esp8266/ets_sys.h"
#include "esp_misc.h"
#include "gpio.h"
#include "freertos/portmacro.h"
#include "gpio.h"
#include "i2c_master.h"
#include "FreeRTOS.h"
static uint8_t m_nLastSDA;
static uint8_t m_nLastSCL;
@ -215,9 +218,9 @@ uint8_t i2c_master_getAck(void)
bool i2c_master_checkAck(void)
{
if (i2c_master_getAck()) {
return FALSE;
return false;
} else {
return TRUE;
return true;
}
}

View File

@ -17,12 +17,15 @@
* @brief Defines and Macros for the SPI.
*/
#include "spi_interface.h"
#include "esp8266/eagle_soc.h"
#include <stdint.h>
#include "esp8266/ets_sys.h"
#include "esp8266/pin_mux_register.h"
#include "esp_libc.h"
#include "freertos/portmacro.h"
#include "spi_interface.h"
#include "FreeRTOS.h"
//*****************************************************************************
//
// Make sure all of the definitions in this header have a C binding.

View File

@ -12,14 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include "esp_common.h"
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "esp8266/pin_mux_register.h"
#include "esp8266/uart_register.h"
#include "esp8266/rom_functions.h"
#include "esp_misc.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/queue.h"
#include "uart.h"
#include "esp8266/rom_functions.h"
enum {
UART_EVENT_RX_CHAR,