add i2c led

This commit is contained in:
wmano
2025-08-21 23:32:18 +08:00
parent 0bd2a89669
commit fa22805dc6
281 changed files with 508 additions and 242 deletions
+8 -9
View File
@@ -7,19 +7,17 @@
#include <rtdevice.h>
#endif /* RT_USING_NANO */
/* defined the LED0 pin: PC4 */
/* LEDs: PC4, PA8, PC5, PA10 */
#define LED0_PIN GET_PIN(A, 8)
#include "led_show.h"
void show_app_version (void)
{
rt_kprintf("\r\n\r\n============================================\r\n");
rt_kprintf("\r\n\r\n================================================\r\n");
rt_kprintf("\tcharger control via RT-Thread v%d.%d.%d\r\n",
RT_VERSION_MAJOR, RT_VERSION_MINOR, RT_VERSION_PATCH);
rt_kprintf("\tbuilt @ %s, %s\r\n", __DATE__, __TIME__);
rt_kprintf("Chip UID: %08X - %08X - %08X\r\n",
HAL_GetUIDw0(), HAL_GetUIDw1(), HAL_GetUIDw2());
rt_kprintf("============================================\r\n");
rt_kprintf("\tUID: %08X %08X %08X\r\n",
HAL_GetUIDw2(), HAL_GetUIDw1(), HAL_GetUIDw0());
rt_kprintf("================================================\r\n");
}
int main(void)
@@ -28,8 +26,7 @@ int main(void)
finsh_set_prompt("chrg ");
#endif
/* set LED0 pin mode to output */
rt_pin_mode(LED0_PIN, PIN_MODE_OUTPUT);
led_init();
while (1)
{
@@ -39,3 +36,5 @@ int main(void)
rt_thread_mdelay(500);
}
}