Skip to content

Commit

Permalink
Update hardware version function to start incrementation on version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
AxxAxx committed Aug 13, 2024
1 parent 2f75351 commit 43dc170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AxxSolder_firmware/Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ void get_mcu_temp(){

/* Function to get the hardware version based on version bit pins */
uint8_t get_hw_version(){
return (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_3_Pin) << 2) + (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_2_Pin) << 1) + (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_1_Pin));
return 3 + (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_3_Pin) << 2) + (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_2_Pin) << 1) + (HAL_GPIO_ReadPin(GPIOC, VERSION_BIT_1_Pin)); //version counting starts at version 3
}

uint16_t RGB_to_BRG(uint16_t color){
Expand Down

0 comments on commit 43dc170

Please sign in to comment.