updated to use defines used in makefile or fallback to inline

This commit is contained in:
Jake Goodwin 2023-02-18 22:47:01 -08:00
parent e77acdd21f
commit 9352fe4cc9
1 changed files with 12 additions and 3 deletions

View File

@ -17,9 +17,18 @@
* AVR D1 --> AT-09 RX
* AVR D2 --> AT-09 State
*/
#define FOSC 1000000UL
#define BLE_BAUD 4800
#define BT_UBRR ((FOSC)/(BLE_BAUD*16UL)-1)
//F_CPU and BAUD should be defined with -D when compiling the code.
#ifndef F_CPU
#define F_CPU 1000000UL
#endif
#ifndef BUAD
#define BAUD 4800
#endif
#define F_UBRR ((F_CPU)/(BAUD*16UL)-1)
#define TX_PIN PIND1
#define TX_DDR DDD1