Commit Graph

3 Commits

Author SHA1 Message Date
Markus Hitter a7240523e1 ARM: rename mbed-LPC11xx.h to cmsis-lpc11xx.h.
Part of the effort to rename all CMSIS-provided files to "cmsis-".
2015-08-12 14:26:36 +02:00
Markus Hitter 8377de8d66 ARM: get delay.c in.
Accuracy is pretty good, see committed comments :-)

Code used for testing, in main():

  uint32_t i;

  SET_OUTPUT(PIO0_1);
  while (1) {
    // 10 seconds for each frequency, so we
    // can measure all three with one upload.
    for (i = 10000; i > 0; i--) {
      WRITE(PIO0_1, 1);
      delay_us(1000);
      WRITE(PIO0_1, 0);
      delay_us(1000);
    }
    for (i = 1000; i > 0; i--) {
      WRITE(PIO0_1, 1);
      delay_us(10000);
      WRITE(PIO0_1, 0);
      delay_us(10000);
    }
    for (i = 200; i > 0; i--) {
      WRITE(PIO0_1, 1);
      delay_us(65000);
      WRITE(PIO0_1, 0);
      delay_us(65000);
    }
  }
2015-08-12 14:26:35 +02:00
Markus Hitter 6c31471ffd ARM: split out architecture specific parts for delay.c
(Hopefully) no functional change.

Also remove these wd_reset()s in delay_us() to match the behaviour
promised in delay.h. Not that this matters much, watchdog is
disabled by default.
2015-08-12 14:26:35 +02:00