main.c 590 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2006-2023, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022/12/25 flyingcys first version
  9. * 2023/11/23 flyingcys add wifi driver
  10. */
  11. #include <rtthread.h>
  12. #include <stdio.h>
  13. #include <rtdevice.h>
  14. int main(void)
  15. {
  16. rt_kprintf("Hello, RISC-V!\n");
  17. #ifdef BSP_USING_WIFI
  18. /* set wifi work mode */
  19. rt_wlan_set_mode(RT_WLAN_DEVICE_STA_NAME, RT_WLAN_STATION);
  20. rt_wlan_set_mode(RT_WLAN_DEVICE_AP_NAME, RT_WLAN_AP);
  21. #endif /* BSP_USING_WIFI */
  22. return 0;
  23. }