esp02_device.c 605 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2019-01-29 XiaojieFan add port file
  9. */
  10. #include "board.h"
  11. #include "drv_gpio.h"
  12. #define ESP8266_CH_PD_Pin GET_PIN(G,1)
  13. #define ESP8266_RST GET_PIN(G,0)
  14. int esp_02_device_init()
  15. {
  16. rt_pin_mode(ESP8266_CH_PD_Pin,PIN_MODE_OUTPUT) ;
  17. rt_pin_mode(ESP8266_RST,PIN_MODE_OUTPUT) ;
  18. rt_pin_write(ESP8266_CH_PD_Pin,PIN_HIGH) ;
  19. rt_pin_write(ESP8266_RST,PIN_HIGH) ;
  20. return RT_EOK ;
  21. }
  22. INIT_DEVICE_EXPORT(esp_02_device_init);