aversive_10-03-12/modules/comm/mf2_client/mf2_client.c File Reference

#include <stdio.h>
#include <aversive.h>
#include <mf2_client.h>
#include <mf2_client_config.h>
#include <aversive/wait.h>

Go to the source code of this file.

Defines

#define WATCHDOG_TIMEOUT   10000
#define MF2_CLIENT_STATE_IDLE   0
#define MF2_CLIENT_STATE_RECV   1
#define MF2_CLIENT_STATE_XMIT   2
#define MF2_CLIENT_STATE_ACK   3
#define data_Z()   cbi(DDR(MF2_CLIENT_DATA_PORT), MF2_CLIENT_DATA_BIT)
#define data_0()   sbi(DDR(MF2_CLIENT_DATA_PORT), MF2_CLIENT_DATA_BIT)
#define clk_Z()   cbi(DDR(MF2_CLIENT_CLK_PORT), MF2_CLIENT_CLK_BIT)
#define clk_0()   sbi(DDR(MF2_CLIENT_CLK_PORT), MF2_CLIENT_CLK_BIT)
#define START_BIT   0x0001
#define PARITY_BIT   0x0200
#define STOP_BIT   0x0400

Typedefs

typedef void( event )(char)

Functions

 SIGNAL (MF2_CLIENT_INTERRUPT)
void mf2_client_init (void)
s08 mf2_client_ready (void)
s08 mf2_client_send (char c)
void mf2_client_register_tx_event (void(*f)(char))
void mf2_client_register_rx_event (void(*f)(char))


Define Documentation

 
#define clk_0 (  )     sbi(DDR(MF2_CLIENT_CLK_PORT), MF2_CLIENT_CLK_BIT)

Definition at line 46 of file mf2_client.c.

Referenced by mf2_client_send(), mf2_server_timer_cb(), recv(), and SIGNAL().

 
#define clk_Z (  )     cbi(DDR(MF2_CLIENT_CLK_PORT), MF2_CLIENT_CLK_BIT)

 
#define data_0 (  )     sbi(DDR(MF2_CLIENT_DATA_PORT), MF2_CLIENT_DATA_BIT)

Definition at line 44 of file mf2_client.c.

Referenced by mf2_server_timer_cb(), recv(), and SIGNAL().

 
#define data_Z (  )     cbi(DDR(MF2_CLIENT_DATA_PORT), MF2_CLIENT_DATA_BIT)

#define MF2_CLIENT_STATE_ACK   3

Definition at line 41 of file mf2_client.c.

Referenced by SIGNAL().

#define MF2_CLIENT_STATE_IDLE   0

Definition at line 38 of file mf2_client.c.

Referenced by mf2_client_init(), mf2_client_ready(), and SIGNAL().

#define MF2_CLIENT_STATE_RECV   1

Definition at line 39 of file mf2_client.c.

Referenced by SIGNAL().

#define MF2_CLIENT_STATE_XMIT   2

Definition at line 40 of file mf2_client.c.

Referenced by mf2_client_send(), and SIGNAL().

#define PARITY_BIT   0x0200

Definition at line 74 of file mf2_client.c.

Referenced by mf2_client_send().

#define START_BIT   0x0001

Definition at line 73 of file mf2_client.c.

#define STOP_BIT   0x0400

Definition at line 75 of file mf2_client.c.

#define WATCHDOG_TIMEOUT   10000

Definition at line 36 of file mf2_client.c.

Referenced by SIGNAL().


Typedef Documentation

typedef void( event)(char)

Definition at line 59 of file mf2_client.c.


Function Documentation

void mf2_client_init ( void   ) 

Definition at line 183 of file mf2_client.c.

References cbi, clk_Z, data_Z, IRQ_LOCK, IRQ_UNLOCK, and MF2_CLIENT_STATE_IDLE.

s08 mf2_client_ready ( void   ) 

Definition at line 226 of file mf2_client.c.

References MF2_CLIENT_STATE_IDLE.

Referenced by mf2_client_send().

void mf2_client_register_rx_event ( void(*)(char)  f  ) 

Definition at line 314 of file mf2_client.c.

References parse_symbols::f, IRQ_LOCK, IRQ_UNLOCK, and rx_event.

void mf2_client_register_tx_event ( void(*)(char)  f  ) 

Definition at line 304 of file mf2_client.c.

References parse_symbols::f, IRQ_LOCK, IRQ_UNLOCK, and tx_event.

s08 mf2_client_send ( char  c  ) 

SIGNAL ( MF2_CLIENT_INTERRUPT   ) 


Generated on Fri Mar 12 06:32:05 2010 for AVR by  doxygen 1.5.6