Skip to content

Commit

Permalink
update some #if defines; continue debugging efm8bb1
Browse files Browse the repository at this point in the history
  • Loading branch information
mightymos committed Jul 1, 2024
1 parent fd16674 commit d9fbcc5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
14 changes: 5 additions & 9 deletions inc/uart_software.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,17 @@
//BAUD = 65536 - FOSC/3/BAUDRATE/M (1T:M=1; 12T:M=12)
//NOTE: (FOSC/3/BAUDRATE) must be greater than 98, (RECOMMEND GREATER THAN 110)

#if defined(TARGET_BOARD_EFM8BB1LCB)

// e.g., hex(65536 - (24500000/2400/12))
#define SOFT_BAUD 0xFCAD
#if defined(TARGET_BOARD_OB38S003)

// e.g, hex(65536 - (16000000/2400/1))
#define SOFT_BAUD 0xE5F5

#elif defined(TARGET_BOARD_EFM8BB1)
#elif defined(TARGET_BOARD_EFM8BB1) || defined (TARGET_BOARD_EFM8BB1LCB)

// e.g., hex(65536 - (24500000/2400/12))
#define SOFT_BAUD 0xFCAD

#elif defined(TARGET_BOARD_OB38S003)

// e.g, hex(65536 - (16000000/2400/1))
#define SOFT_BAUD 0xE5F5

#endif


Expand Down
8 changes: 4 additions & 4 deletions src/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include "hal.h"

#if defined(TARGET_BOARD_OB38S003)
#include "OB38S003.h"
#include "OB38S003.h"
#elif defined(TARGET_BOARD_EFM8BB1) || defined(TARGET_BOARD_EFM8BB1LCB)
// these are just a difference in naming convention
#define SBUF SBUF0
#define SCON SCON0
// these are just a difference in naming convention
#define SBUF SBUF0
#define SCON SCON0
#endif

#include "uart.h"
Expand Down

0 comments on commit d9fbcc5

Please sign in to comment.