mirror of
https://github.com/halleysfifthinc/Toyota-AVC-LAN
synced 2025-06-07 16:06:12 +00:00
Remove LED functionality
This commit is contained in:
parent
1da1a52c68
commit
84fa2fdebc
@ -21,19 +21,12 @@
|
|||||||
#define INPUT_IS_SET (bit_is_set(AC2_STATUS, AC_STATE_bp))
|
#define INPUT_IS_SET (bit_is_set(AC2_STATUS, AC_STATE_bp))
|
||||||
#define INPUT_IS_CLEAR (bit_is_clear(AC2_STATUS, AC_STATE_bp))
|
#define INPUT_IS_CLEAR (bit_is_clear(AC2_STATUS, AC_STATE_bp))
|
||||||
|
|
||||||
#define LED_DDR DDRB
|
|
||||||
#define LED_PORT PORTB
|
|
||||||
#define LEDOUT _BV(PORT5)
|
|
||||||
|
|
||||||
#define sbi(port, bit) (port) |= (1 << (bit)) // Set bit (i.e. to 1)
|
#define sbi(port, bit) (port) |= (1 << (bit)) // Set bit (i.e. to 1)
|
||||||
#define cbi(port, bit) (port) &= ~(1 << (bit)) // Clear bit (i.e. set bit to 0)
|
#define cbi(port, bit) (port) &= ~(1 << (bit)) // Clear bit (i.e. set bit to 0)
|
||||||
|
|
||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
typedef unsigned int word;
|
typedef unsigned int word;
|
||||||
|
|
||||||
inline void LedOff(void);
|
|
||||||
inline void LedOn(void);
|
|
||||||
|
|
||||||
// max 10 events in fifo
|
// max 10 events in fifo
|
||||||
extern byte EventCount;
|
extern byte EventCount;
|
||||||
extern byte EventCmd[10];
|
extern byte EventCmd[10];
|
||||||
|
4
com232.c
4
com232.c
@ -33,10 +33,6 @@ byte RS232_RxCharBuffer[25], RS232_RxCharBegin, RS232_RxCharEnd;
|
|||||||
byte readkey;
|
byte readkey;
|
||||||
|
|
||||||
void RS232_Init(void) {
|
void RS232_Init(void) {
|
||||||
// // init LED
|
|
||||||
// sbi(DDRB, 5);
|
|
||||||
// cbi(PORTB, 5);
|
|
||||||
|
|
||||||
RS232_RxCharBegin = RS232_RxCharEnd = 0;
|
RS232_RxCharBegin = RS232_RxCharEnd = 0;
|
||||||
|
|
||||||
USART0.CTRLA = USART_RXCIE_bm; // Enable receive interrupts
|
USART0.CTRLA = USART_RXCIE_bm; // Enable receive interrupts
|
||||||
|
@ -49,7 +49,6 @@ int main() {
|
|||||||
Setup();
|
Setup();
|
||||||
|
|
||||||
RS232_Print("AVCLan reader 1.00\nReady\n\n");
|
RS232_Print("AVCLan reader 1.00\nReady\n\n");
|
||||||
// LED_OFF();
|
|
||||||
RS232_Print_P(PSTR("\nS - read sequence\nW - send command\nQ - send "
|
RS232_Print_P(PSTR("\nS - read sequence\nW - send command\nQ - send "
|
||||||
"broadcast\nL/l - log on/off\nK/k - seq. echo on/off\n"));
|
"broadcast\nL/l - log on/off\nK/k - seq. echo on/off\n"));
|
||||||
RS232_Print_P(PSTR("R/r - register device\nB - Beep\n"));
|
RS232_Print_P(PSTR("R/r - register device\nB - Beep\n"));
|
||||||
@ -63,11 +62,9 @@ int main() {
|
|||||||
while (1) {
|
while (1) {
|
||||||
|
|
||||||
if (INPUT_IS_SET) { // if message from some device on AVCLan begin
|
if (INPUT_IS_SET) { // if message from some device on AVCLan begin
|
||||||
// LED_ON();
|
|
||||||
AVCLan_Read_Message();
|
AVCLan_Read_Message();
|
||||||
// show message
|
// show message
|
||||||
} else {
|
} else {
|
||||||
// LED_OFF();
|
|
||||||
// check command from HU
|
// check command from HU
|
||||||
if (answerReq != 0)
|
if (answerReq != 0)
|
||||||
AVCLan_SendAnswer();
|
AVCLan_SendAnswer();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user