Core module implements eeprom, pins and time.
|
| void | coreInit () |
| | Init core module. More...
|
| |
|
void | highInterrupts () |
| | User defined high priority interrupt routine.
|
| |
|
void | lowInterrupts () |
| | User defined low priority interrupt routine.
|
| |
|
void | eeWriteByte (unsigned char address, unsigned char value) |
| | Write to eeprom.
|
| |
|
unsigned char | eeReadByte (unsigned char address) |
| | Write to eeprom.
|
| |
|
|
#define | BIT_COPY(dest, src) |
| | Copy bit src to dest.
|
| |
|
#define | bitset(var, bitno) |
| | Set bit bitno in variable var.
|
| |
|
#define | bitclr(var, bitno) |
| | Clear bit bitno in variable var.
|
| |
|
#define | bittst(var, bitno) |
| | Get value of bit bitno in variable var.
|
| |
|
|
typedef unsigned long | t_delay |
| | Delay type.
|
| |
|
unsigned unsigned long int | time (void) |
| | Get time since bootup in 64/FOSC steps (1us @ 64MHz, 8us @ 8MHz).
|
| |
|
#define | timeISR() |
| | time() equivalent to be used inside of interrupts routines.
|
| |
| #define | delayStart(delay, micros) |
| | Start delay. More...
|
| |
| #define | delayFinished(delay) |
| | Test delay timeout. More...
|
| |
Init core module.
Init processor, configure TIMER0 for time() use. Normally coreInit() is called by fruitInit() (see module fruit), so you don't have to call it by yourself.
| #define delayFinished |
( |
|
delay | ) |
|
Test delay timeout.
- Parameters
-
| delay | Delay to test (use t_delay type) |
- Returns
- TRUE if timeout
| #define delayStart |
( |
|
delay, |
|
|
|
micros |
|
) |
| |
Start delay.
- Parameters
-
| delay | Delay to start (use t_delay type) |
| micros | Timeout in microseconds |
| #define digitalClear |
( |
|
conn | ) |
|
Digital clear pin. Clear the pin output voltage.
- Parameters
-
| conn | Symbol of the pin (example : K1 for connector 1) |
| #define digitalRead |
( |
|
conn | ) |
|
Digital read from pin. Get the voltage (0/1) seen from the pin.
- Parameters
-
| conn | Symbol of the pin (example : K1 for connector 1) |
- Returns
- 0 if voltage was LOW
-
1 if voltage was HIGH
| #define digitalSet |
( |
|
conn | ) |
|
Digital set pin. Set the pin output voltage ot HIGH.
- Parameters
-
| conn | Symbol of the pin (example : K1 for connector 1) |
| #define digitalWrite |
( |
|
conn, |
|
|
|
val |
|
) |
| |
Digital write to pin. Set the pin output voltage to LOW or HIGH.
- Parameters
-
| conn | Symbol of the pin (example : K1 for connector 1) |
| val | 0 or 1 |
| #define pinModeAnalogIn |
( |
|
conn | ) |
|
Set pin to Analog Input.
- Parameters
-
| conn | Symbol of the pin (example : K1 for connector 1) |
| #define pinModeDigitalIn |
( |
|
conn | ) |
|
Set pin to Digital Input.
- Parameters
-
| conn | Symbol of the pin (example : K1 for connector 1) |
| #define pinModeDigitalOut |
( |
|
conn | ) |
|
Set pin to Digital Output.
- Parameters
-
| conn | Symbol of the pin (example : K1 for connector 1) |