File tree Expand file tree Collapse file tree 6 files changed +179
-300
lines changed
Expand file tree Collapse file tree 6 files changed +179
-300
lines changed Original file line number Diff line number Diff line change 1111#include <rthw.h>
1212#include <rtthread.h>
1313#include "board.h"
14+ #include <drivers/pin.h>
1415
15- /*******************************************************************************
16- * Function Name : assert_failed
17- * Description : Reports the name of the source file and the source line number
18- * where the assert error has occurred.
19- * Input : - file: pointer to the source file name
20- * - line: assert error line source number
21- * Output : None
22- * Return : None
23- *******************************************************************************/
24-
25- void assert_failed (uint8_t * file , uint32_t line )
26- {
27- rt_kprintf ("\n\r Wrong parameter value detected on\r\n" );
28- rt_kprintf (" file %s\r\n" , file );
29- rt_kprintf (" line %d\r\n" , line );
30-
31- while (1 ) ;
32- }
16+ #define LED_PIN_NUM 1 /* PA1 */
3317
3418int main (void )
3519{
36- rt_hw_led_init ();
20+ rt_pin_mode (LED_PIN_NUM , PIN_MODE_OUTPUT );
21+
3722 while (1 )
3823 {
39- rt_hw_led_on ( 0 );
24+ rt_pin_write ( LED_PIN_NUM , PIN_LOW );
4025 rt_thread_delay (RT_TICK_PER_SECOND /2 );
41- rt_hw_led_off ( 0 );
26+ rt_pin_write ( LED_PIN_NUM , PIN_HIGH );
4227 rt_thread_delay (RT_TICK_PER_SECOND /2 );
4328 }
4429}
Original file line number Diff line number Diff line change 1313
1414#include <rtconfig.h>
1515#include "ACM32Fxx_HAL.h"
16- #include "led.h"
1716
1817/*-------------------------- UART CONFIG BEGIN --------------------------*/
1918
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments