From 9f5d7fd40b63d3d55bff540a5d5e03ecd8257276 Mon Sep 17 00:00:00 2001 From: flabbergast Date: Tue, 22 Mar 2016 17:56:38 +0000 Subject: [KINETIS] Add new testhal demos (KL27Z,Teensies,MCHCK). --- testhal/KINETIS/TEENSY_LC/EEPROM_EMU/main.c | 78 +++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 testhal/KINETIS/TEENSY_LC/EEPROM_EMU/main.c (limited to 'testhal/KINETIS/TEENSY_LC/EEPROM_EMU/main.c') diff --git a/testhal/KINETIS/TEENSY_LC/EEPROM_EMU/main.c b/testhal/KINETIS/TEENSY_LC/EEPROM_EMU/main.c new file mode 100644 index 0000000..c827944 --- /dev/null +++ b/testhal/KINETIS/TEENSY_LC/EEPROM_EMU/main.c @@ -0,0 +1,78 @@ +/* + (C) 2015-2016 flabbergast + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +#include "hal.h" + +#include "eeprom.h" + +#define LED_GPIO TEENSY_PIN13_IOPORT +#define LED_PIN TEENSY_PIN13 + +uint8_t n_of_blinks; + +static THD_WORKING_AREA(waBlinkThread, 128); +static THD_FUNCTION(BlinkThread, arg) { + (void)arg; + uint8_t i; + + for(i=0; i