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);
|
|
}
|
|
}
|
|
|