[SOFT 999] FW 103 HW - #504
Conversation
mitchellostler
left a comment
There was a problem hiding this comment.
Looks good, but there are a few issues that will prevent the program from compiling. You should run make run PROJECT=fw_103_hw PLATFORM=x86
| .priority = INTERRUPT_PRIORITY_HIGH, | ||
| }; | ||
|
|
||
| adc_set_channel_pin(button_addr, true); |
There was a problem hiding this comment.
The adc should be set for the potentiometer pin, instead of the button
mitchellostler
left a comment
There was a problem hiding this comment.
FW 103 looks good, just a couple of fixes and you should be good to go. Were you able to get it to run?
Also a note: You should really put your name in your branch name, since there are other people using the same ticket number for homework
|
|
||
|
|
||
| // GPIO address that we will allow us to read button data | ||
| const GpioAddress potentiometer_addr_A6 = { // could be passed as context |
There was a problem hiding this comment.
Good programming practice is to not to use global variables (ie any variable that is non-static declared outside a function). The const is good since they won't be changed, but declare them static as well const static
| adc_init(ADC_MODE_SINGLE); | ||
|
|
||
| // GPIO Address where button is pressed | ||
| GpioAddress potentiometer_addr_B2 = { |
There was a problem hiding this comment.
This wouldn't be a potentiometer address, this would be a button address, so it would be good to label it as such
FW 103 HW