Fraise  2.1
FRAmework for Interfacing Software and Electronics
 All Classes Files Functions Typedefs Groups
Core module.

Core module implements eeprom, pins and time.

Functions

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.
 

Pin routines

#define digitalRead(conn)
 Digital read from pin. Get the voltage (0/1) seen from the pin. More...
 
#define digitalWrite(conn, val)
 Digital write to pin. Set the pin output voltage to LOW or HIGH. More...
 
#define digitalClear(conn)
 Digital clear pin. Clear the pin output voltage. More...
 
#define digitalSet(conn)
 Digital set pin. Set the pin output voltage ot HIGH. More...
 
#define pinModeDigitalIn(conn)
 Set pin to Digital Input. More...
 
#define pinModeAnalogIn(conn)
 Set pin to Analog Input. More...
 
#define pinModeDigitalOut(conn)
 Set pin to Digital Output. More...
 
#define setPinAnsel(conn, val)
 

Bit macro

#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.
 

Time functions

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...
 

Function Documentation

void coreInit ( )

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.

Macro Definition Documentation

#define delayFinished (   delay)

Test delay timeout.

Parameters
delayDelay to test (use t_delay type)
Returns
TRUE if timeout
#define delayStart (   delay,
  micros 
)

Start delay.

Parameters
delayDelay to start (use t_delay type)
microsTimeout in microseconds
#define digitalClear (   conn)

Digital clear pin. Clear the pin output voltage.

Parameters
connSymbol 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
connSymbol 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
connSymbol 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
connSymbol of the pin (example : K1 for connector 1)
val0 or 1
#define pinModeAnalogIn (   conn)

Set pin to Analog Input.

Parameters
connSymbol of the pin (example : K1 for connector 1)
#define pinModeDigitalIn (   conn)

Set pin to Digital Input.

Parameters
connSymbol of the pin (example : K1 for connector 1)
#define pinModeDigitalOut (   conn)

Set pin to Digital Output.

Parameters
connSymbol of the pin (example : K1 for connector 1)