kopia lustrzana https://github.com/SP8EBC/ParaTNC
handling missing i2c state
rodzic
e9beb2be98
commit
6405a3d35a
Plik binarny nie jest wyświetlany.
Po Szerokość: | Wysokość: | Rozmiar: 112 KiB |
|
@ -5,7 +5,7 @@
|
|||
#include "drivers/serial.h"
|
||||
|
||||
#define SW_VER "DF00"
|
||||
#define SW_DATE "13042020"
|
||||
#define SW_DATE "28042020"
|
||||
|
||||
#define SYSTICK_TICKS_PER_SECONDS 100
|
||||
#define SYSTICK_TICKS_PERIOD 10
|
||||
|
|
|
@ -149,8 +149,7 @@ static void message_callback(struct AX25Msg *msg) {
|
|||
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char* argv[]){
|
||||
int main(int argc, char* argv[]){
|
||||
// Send a greeting to the trace device (skipped on Release).
|
||||
// trace_puts("Hello ARM World!");
|
||||
|
||||
|
|
|
@ -146,7 +146,13 @@ void i2cVariableReset(void) {
|
|||
}
|
||||
|
||||
void i2cIrqHandler(void) {
|
||||
// int i;
|
||||
|
||||
if ((I2C1->SR1 & I2C_SR1_STOPF) == I2C_SR1_STOPF) {
|
||||
I2C1->SR1 &= (0xFFFFFFFF ^ I2C_SR1_STOPF);
|
||||
i2cStop();
|
||||
|
||||
i2c_state = I2C_ERROR;
|
||||
}
|
||||
if ((I2C1->SR1 & I2C_SR1_SB) == I2C_SR1_SB && (i2c_txing == 1 || i2c_rxing == 1)) {
|
||||
// After Start conditions have been transmitted.
|
||||
I2C1->DR = i2c_remote_addr; // Loading the slave address into data register
|
||||
|
|
Ładowanie…
Reference in New Issue