main.c 540 B

12345678910111213141516171819202122232425
  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. /* set wifi work mode */
  18. rt_wlan_set_mode(RT_WLAN_DEVICE_STA_NAME, RT_WLAN_STATION);
  19. rt_wlan_set_mode(RT_WLAN_DEVICE_AP_NAME, RT_WLAN_AP);
  20. return 0;
  21. }