2019-01-30 14:29:27 +08:00
|
|
|
/*
|
2021-03-14 15:33:55 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2019-01-30 14:29:27 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2019-01-29 XiaojieFan add port file
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "board.h"
|
|
|
|
#include "drv_gpio.h"
|
|
|
|
|
|
|
|
#define ESP8266_CH_PD_Pin GET_PIN(G,1)
|
2019-02-01 10:07:56 +08:00
|
|
|
#define ESP8266_RST GET_PIN(G,0)
|
2019-01-30 14:29:27 +08:00
|
|
|
|
|
|
|
int esp_02_device_init()
|
|
|
|
{
|
|
|
|
rt_pin_mode(ESP8266_CH_PD_Pin,PIN_MODE_OUTPUT) ;
|
2019-02-01 10:07:56 +08:00
|
|
|
rt_pin_mode(ESP8266_RST,PIN_MODE_OUTPUT) ;
|
|
|
|
rt_pin_write(ESP8266_CH_PD_Pin,PIN_HIGH) ;
|
|
|
|
rt_pin_write(ESP8266_RST,PIN_HIGH) ;
|
|
|
|
|
2021-03-14 15:33:55 +08:00
|
|
|
return RT_EOK ;
|
2019-01-30 14:29:27 +08:00
|
|
|
}
|
|
|
|
INIT_DEVICE_EXPORT(esp_02_device_init);
|