|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
-
-
- #ifndef WiringPrivate_h
- #define WiringPrivate_h
-
- #include <avr/io.h>
- #include <avr/interrupt.h>
- #include <stdio.h>
- #include <stdarg.h>
-
- #include "wiring.h"
-
- #if F_CPU == 16000000L
- #define ADC_PRESCALER 0x07
- #define CPU_PRESCALER 0x00
- #elif F_CPU == 8000000L
- #define ADC_PRESCALER 0x06
- #define CPU_PRESCALER 0x01
- #elif F_CPU == 4000000L
- #define ADC_PRESCALER 0x05
- #define CPU_PRESCALER 0x02
- #elif F_CPU == 2000000L
- #define ADC_PRESCALER 0x04
- #define CPU_PRESCALER 0x03
- #elif F_CPU == 1000000L
- #define ADC_PRESCALER 0x03
- #define CPU_PRESCALER 0x04
- #else
- #error "Teensyduino only supports 16, 8, 4, 2, 1 MHz. Please edit boards.txt"
- #endif
-
-
- #ifdef __cplusplus
- extern "C"{
- #endif
-
- #ifndef cbi
- #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
- #endif
- #ifndef sbi
- #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
- #endif
-
- typedef void (*voidFuncPtr)(void);
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
|