Commit Graph

3 Commits

Author SHA1 Message Date
Nico Tonnhofer a798cfac34 STM32F411: get timer.c in, so far only with the system clock.
This test code in SysTickHandler() should give you a rather
accurate clock with only a few seconds deviation per hour:

  #include "serial.h"
  #include "sersendf.h"
  void SysTick_Handler(void) {
    static uint32_t count = 0;
    static uint8_t minutes = 0, seconds = 0;

    count++;

    if ( ! (count % 500)) {   // A full second.
      seconds++;
      if ( ! (seconds % 60)) {
        seconds = 0;
        minutes++;
      }
      sersendf_P(PSTR("%su:"), minutes);
      if (seconds < 10)
        serial_writechar('0');
      sersendf_P(PSTR("%su\n"), seconds);
    }
  [...]
2017-03-03 18:54:56 +01:00
Nico Tonnhofer fd81ea9c60 STM32F411: prettify cmsis-system_stm32f4xx.c/.h.
Remove trailing whitespace and such stuff.
2017-03-03 18:54:56 +01:00
Nico Tonnhofer 8cf27adcba ARM: rename mbed-system_stm32f4xx.c/.h to cmsis-system_stm32f4xx.c/.h.
Last part of the effort to rename all CMSIS-provided files to "cmsis-".
2017-03-03 18:54:56 +01:00