Skip to content

Commit

Permalink
Correctly report old hardware as V5
Browse files Browse the repository at this point in the history
  • Loading branch information
bessman committed Jan 15, 2024
1 parent 80f021d commit 11e3efc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DS_Store

.generated_files
build
build*
dist
nbproject
Makefile
Expand Down
9 changes: 7 additions & 2 deletions src/helpers/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@

#define SEMVERS 3

static uint8_t const VERSION_HW[] = "PSLab V6"; /** Hardware version. **/
static uint8_t const VERSION_HW[] =
#ifndef V5_HW
"PSLab V6";
#else
"PSLab V5";
#endif // V5_HW
static union {
struct {
uint8_t const major;
Expand Down Expand Up @@ -49,7 +54,7 @@ response_t DEVICE_Reset(void) {
response_t DEVICE_ReadRegisterData(void) {
uint16_t *address = (uint16_t *) (UART1_ReadInt() & 0xFFFF);
UART1_WriteInt(*address);

return SUCCESS;
}

Expand Down

0 comments on commit 11e3efc

Please sign in to comment.