Inlined STM8S SPL (STM8S103) for use with SDCC
您最多能選擇 25 個主題
主題必須以字母或數字為開頭,可包含連接號「-」且最長為 35 個字元。
|
#include "stm8s.h"
|
|
#include <stdio.h>
|
|
#include "bootstrap.h"
|
|
|
|
void main(void)
|
|
{
|
|
SimpleInit();
|
|
|
|
// clear screen, hide cursor
|
|
printf("\033c\033[?25lClock freq = \033[32m%lu Hz\033[0m\r\n", CLK_GetClockFreq());
|
|
|
|
while (1) {
|
|
LED_Toggle();
|
|
printf("Time = %lu ms\r", time_ms);
|
|
Delay(500);
|
|
}
|
|
}
|
|
|