@@ -1,7 +1,7 @@ | |||
#ifndef DMAChannel_h_ | |||
#define DMAChannel_h_ | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
// This code is a work-in-progress. It's incomplete and not usable yet... | |||
// |
@@ -31,8 +31,7 @@ | |||
#ifndef HardwareSerial_h | |||
#define HardwareSerial_h | |||
#include "mk20dx128.h" | |||
#include <inttypes.h> | |||
#include "kinetis.h" | |||
// uncomment to enable 9 bit formats | |||
//#define SERIAL_9BIT_SUPPORT |
@@ -21,8 +21,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ | |||
#ifndef __INTERVALTIMER_H__ | |||
#define __INTERVALTIMER_H__ | |||
#include <stdint.h> | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
#ifdef __cplusplus | |||
extern "C" { |
@@ -31,7 +31,7 @@ | |||
#ifndef _avr_emulation_h_ | |||
#define _avr_emulation_h_ | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
#include "core_pins.h" | |||
#include "pins_arduino.h" | |||
@@ -31,7 +31,7 @@ | |||
#ifndef _core_pins_h_ | |||
#define _core_pins_h_ | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
#include "pins_arduino.h" | |||
@@ -693,6 +693,11 @@ void analogWriteRes(uint32_t bits); | |||
static inline void analogWriteResolution(uint32_t bits) { analogWriteRes(bits); } | |||
void analogWriteFrequency(uint8_t pin, uint32_t frequency); | |||
void analogWriteDAC0(int val); | |||
#ifdef __cplusplus | |||
void attachInterruptVector(IRQ_NUMBER_t irq, void (*function)(void)); | |||
#else | |||
void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)); | |||
#endif | |||
void attachInterrupt(uint8_t pin, void (*function)(void), int mode); | |||
void detachInterrupt(uint8_t pin); | |||
void _init_Teensyduino_internal_(void); |
@@ -28,7 +28,7 @@ | |||
* SOFTWARE. | |||
*/ | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
#include <stdint.h> | |||
//#include "HardwareSerial.h" | |||
@@ -28,7 +28,7 @@ | |||
* SOFTWARE. | |||
*/ | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
extern unsigned long _stext; |
@@ -116,6 +116,11 @@ void init_pin_interrupts(void) | |||
// fast interrupts will still be serviced quickly? | |||
} | |||
void attachInterruptVector(enum IRQ_NUMBER_t irq, void (*function)(void)) | |||
{ | |||
_VectorsRam[irq + 16] = function; | |||
} | |||
void attachInterrupt(uint8_t pin, void (*function)(void), int mode) | |||
{ | |||
volatile uint32_t *config; |
@@ -28,7 +28,7 @@ | |||
* SOFTWARE. | |||
*/ | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
#include "core_pins.h" | |||
#include "HardwareSerial.h" | |||
@@ -28,7 +28,7 @@ | |||
* SOFTWARE. | |||
*/ | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
#include "core_pins.h" | |||
#include "HardwareSerial.h" | |||
@@ -28,7 +28,7 @@ | |||
* SOFTWARE. | |||
*/ | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
#include "core_pins.h" | |||
#include "HardwareSerial.h" | |||
@@ -33,7 +33,7 @@ | |||
#include "usb_desc.h" | |||
#ifdef NUM_ENDPOINTS | |||
#include "usb_names.h" | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
#include "avr_functions.h" | |||
// USB Descriptors are binary data which the USB host reads to |
@@ -31,7 +31,7 @@ | |||
#include "usb_dev.h" | |||
#if F_CPU >= 20000000 && defined(NUM_ENDPOINTS) | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
//#include "HardwareSerial.h" | |||
#include "usb_mem.h" | |||
@@ -31,7 +31,7 @@ | |||
#include "usb_dev.h" | |||
#if F_CPU >= 20000000 && defined(NUM_ENDPOINTS) | |||
#include "mk20dx128.h" | |||
#include "kinetis.h" | |||
//#include "HardwareSerial.h" | |||
#include "usb_mem.h" | |||
@@ -30,7 +30,6 @@ | |||
#if F_CPU >= 20000000 | |||
//#include "mk20dx128.h" | |||
#include "usb_dev.h" | |||
#include "usb_seremu.h" | |||
#include "core_pins.h" // for yield() |