Inlined STM8S SPL (STM8S103) for use with SDCC

main.c 298B

123456789101112131415161718
  1. #include "stm8s.h"
  2. #include <stdio.h>
  3. #include "bootstrap.h"
  4. void main(void)
  5. {
  6. SimpleInit();
  7. // clear screen, hide cursor
  8. printf("\033c\033[?25lClock freq = \033[32m%lu Hz\033[0m\r\n", CLK_GetClockFreq());
  9. while (1) {
  10. LED_Toggle();
  11. printf("Time = %lu ms\r", time_ms);
  12. Delay(500);
  13. }
  14. }