Skip to content

Commit

Permalink
buspirate v4: detect the A6 revision
Browse files Browse the repository at this point in the history
  • Loading branch information
denis2342 committed Mar 15, 2024
1 parent 4c2c104 commit 9b3566c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Firmware/hardwarev4.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@

#define PIC_REV_A3 0x0001
#define PIC_REV_A5 0x0003
#define PIC_REV_A6 0x0004

static inline void bp_enable_usb_led(void) {
BP_LEDUSB_DIR = OUTPUT;
Expand Down
2 changes: 2 additions & 0 deletions Firmware/messages_v4.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ void MSG_CHIP_REVISION_A3_str(void);
#define MSG_CHIP_REVISION_A3 bp_message_write_buffer(__builtin_tbladdress(MSG_CHIP_REVISION_A3_str))
void MSG_CHIP_REVISION_A5_str(void);
#define MSG_CHIP_REVISION_A5 bp_message_write_buffer(__builtin_tbladdress(MSG_CHIP_REVISION_A5_str))
void MSG_CHIP_REVISION_A6_str(void);
#define MSG_CHIP_REVISION_A6 bp_message_write_buffer(__builtin_tbladdress(MSG_CHIP_REVISION_A6_str))
void MSG_CHIP_REVISION_ID_BEGIN_str(void);
#define MSG_CHIP_REVISION_ID_BEGIN bp_message_write_buffer(__builtin_tbladdress(MSG_CHIP_REVISION_ID_BEGIN_str))
void MSG_CHIP_REVISION_UNKNOWN_str(void);
Expand Down
6 changes: 6 additions & 0 deletions Firmware/messages_v4.s
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,12 @@ _MSG_CHIP_REVISION_A3_str:
_MSG_CHIP_REVISION_A5_str:
.pasciz "A5"

; MSG_CHIP_REVISION_A6
.section .text.MSG_CHIP_REVISION_A6, code
.global _MSG_CHIP_REVISION_A6_str
_MSG_CHIP_REVISION_A6_str:
.pasciz "A6"

; MSG_CHIP_REVISION_ID_BEGIN
.section .text.MSG_CHIP_REVISION_ID_BEGIN, code
.global _MSG_CHIP_REVISION_ID_BEGIN_str
Expand Down
4 changes: 4 additions & 0 deletions Firmware/proc_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,10 @@ void print_version_info(void) {
MSG_CHIP_REVISION_A5;
break;

case PIC_REV_A6:
MSG_CHIP_REVISION_A6;
break;

default:
MSG_CHIP_REVISION_UNKNOWN;
break;
Expand Down

0 comments on commit 9b3566c

Please sign in to comment.