HAL updates

This commit is contained in:
Scott Lahteine
2017-09-06 06:28:32 -05:00
parent 65996e4235
commit 54326fb06a
52 changed files with 327 additions and 378 deletions

View File

@@ -30,8 +30,6 @@
// Includes
// --------------------------------------------------------------------------
#include <stdint.h>
#include "Arduino.h"
#include "fastio_Teensy.h"
@@ -39,10 +37,13 @@
#include "HAL_timers_Teensy.h"
#include <stdint.h>
// --------------------------------------------------------------------------
// Defines
// --------------------------------------------------------------------------
#undef MOTHERBOARD
#define MOTHERBOARD BOARD_TEENSY35_36
#define IS_32BIT_TEENSY (defined(__MK64FX512__) || defined(__MK66FX1M0__))
@@ -79,9 +80,10 @@
// Fix bug in pgm_read_ptr
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*(addr))
#define pgm_read_ptr(addr) (*((void**)(addr)))
// Add type-checking to pgm_read_word
#undef pgm_read_word
#define pgm_read_word(addr) (*(addr))
#define pgm_read_word(addr) (*((uint16_t*)(addr)))
#define RST_POWER_ON 1
#define RST_EXTERNAL 2