Commit 5e80e898 authored by Guilherme Sanches's avatar Guilherme Sanches

Work in progress. Correction need to be made on the occan_interrupt

funciton to compile
parent d913cca1
......@@ -230,13 +230,18 @@ typedef struct {
// uint32_t * addr;
//} occan_txrxdesc;
typedef struct occan_filter_{
unsigned char code[4];
unsigned char mask[4];
int single_mode;
} occan_filter;
typedef struct {
/* hardware shortcuts */
pelican_regs *regs;
int irq;
occan_speed_regs timing;
int channel; /* 0=default, 1=second bus */
int single_mode;
/* driver state */
rtems_id devsem;
......@@ -248,13 +253,17 @@ typedef struct {
int txblk;
unsigned int status;
occan_stats stats;
int sending;
/* Config */
unsigned int speed; /* speed in HZ */
unsigned char code[4];
unsigned char mask[4];
// int single_mode;
// unsigned char code[4];
// unsigned char mask[4];
occan_filter *filter;
occan_fifo *internal_msg_queue;
occan_fifo *tx_msg_queue;
occan_fifo *rx_msg_queue;
/* IOP descriptors */
// occan_txrxdesc txdesc;
......
This diff is collapsed.
......@@ -3,7 +3,7 @@
/* Clear all entries on the fifo and
* control data */
void occan_fifo_clear(occan_fifo *queue ){
uint8_t occan_fifo_clear(occan_fifo *queue ){
int i;
for(i = 0; i < queue->max; i++){
......@@ -17,6 +17,8 @@ void occan_fifo_clear(occan_fifo *queue ){
queue->ovcnt = 0;
queue->last = 0;
queue->next = 0;
return 1;
}
/* TODO force put option for when the queue is full */
......@@ -34,6 +36,7 @@ uint8_t occan_fifo_put(occan_fifo *queue, CANMsg *new, int force){
}else{
queue->last++;
}
return 1;
}
CANMsg *occan_fifo_get(occan_fifo *queue){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment