fixed typo - #3
Conversation
fixed a typo
I struggled with how the addressing works in this for a day, added some more explanation on how to use the static vars to build address'.
Additional Example for reading all inputs
keyboard input driven by gpio pin inputs
mdhardenburgh
left a comment
There was a problem hiding this comment.
Code looks great! thank you for contributing! I haven't tested it, but it just looking at it, I think the examples should work. I added some comments regarding some stylistic things. My indents are 4 spaces, it didnt you used 4 spaces. For block comments at the beginning of files I use the comment block "/**/" instead of "//", and I bring down the first curly brace to a new line. If you can address that, Ill approve it and merge. Thanks!
| @@ -0,0 +1,189 @@ | |||
| //This example uses pin 40, 38, and 37. | |||
There was a problem hiding this comment.
Maybe add a short comment that elaborates about the example program. I also use following block comments style for header comments
/*
*
*/
I would like to keep the style the same, can you change it to that style?.
| { | ||
| readGPIOINPUT = myGpioController3.getRegisterField(GPIO_IN_1_RMW::addressOffset, GPIO_IN_1_RMW::BIT_6_baseBit, GPIO_IN_1_RMW::BIT_6_bitWidth); | ||
| //std::cout<<"pin 40 INPUT bit: "<<readGPIOINPUT<<std::endl; | ||
| if(readGPIOINPUT == 0) { |
|
|
||
| int main() | ||
| { | ||
| PeripheralController myGpioController1(gpioController::gpioController1BaseAddress); |
There was a problem hiding this comment.
The style I use is indent of 4 spaces for every scope. Can you change it to that?
| @@ -0,0 +1,344 @@ | |||
| //All uncommented reads in the loop should work with the default SD card image | |||
There was a problem hiding this comment.
Same stylistic comments as with the keyboard_emu.cpp file
fixed a typo
(and added some comments to further explain the addressing)
Also, thank you for making this. I was totally lost with the other available examples ;)