CROSS Technical Documentation User Manual and Technical Doc.
INFN Milano Bicocca
Loading...
Searching...
No Matches

◆ I2C_1_SignalEvent_t()

void I2C_1_SignalEvent_t ( uint32_t  event)

The I2C_1 interrupt function.

Returns
No Parameters
37void I2C_1_SignalEvent_t (uint32_t event)
38{
39// if(event==ARM_I2C_EVENT_TRANSFER_DONE) // Ricezione e trasmissione finita sia del master che dello slave
40// {
41// __NOP();
42// }
43// if(event==ARM_I2C_EVENT_SLAVE_TRANSMIT)
44// {
45// __NOP();
46// }
47// if(event==ARM_I2C_EVENT_SLAVE_RECEIVE)
48// {
49// __NOP();
50// }
51// if(event==ARM_I2C_EVENT_ADDRESS_NACK)
52// {
53// __NOP();
54// }
55 evento_I2C=event;
56 if(event==ARM_I2C_EVENT_TRANSFER_DONE) // Ricezione e trasmissione finita sia del master che dello slave
57 {
58 __NOP();
59 Error_bad_operation = 0; // Non registriamo errori
60 }
61 if( event & ARM_I2C_EVENT_TRANSFER_INCOMPLETE)
62 {
64 }
65 if(event==ARM_I2C_EVENT_SLAVE_TRANSMIT)
66 {
67 __NOP();
69 }
70 if(event==ARM_I2C_EVENT_SLAVE_RECEIVE)
71 {
72 __NOP();
74 }
75 if (event & ARM_I2C_EVENT_ADDRESS_NACK){
77 }
78 if (event & ARM_I2C_EVENT_ARBITRATION_LOST){
80 }
81 if( event & ARM_I2C_EVENT_BUS_ERROR){
83 }
84 if( event & ARM_I2C_EVENT_BUS_CLEAR){
86 }
87}
volatile uint32_t Error_bad_operation
exploited to mark the errors
uint32_t evento_I2C
This is the variable which resembles the flags from the communication.
Definition: I2C_0.c:300
void I2C_1_SignalEvent_t(uint32_t event)
The I2C_1 interrupt function.
Definition: I2C_1.c:37

Definition at line 37 of file I2C_1.c.

Referenced by I2C_1_Initialize().