Skip to content

fixed typo - #3

Open
wassti wants to merge 4 commits into
mdhardenburgh:mainfrom
wassti:main
Open

fixed typo#3
wassti wants to merge 4 commits into
mdhardenburgh:mainfrom
wassti:main

Conversation

@wassti

@wassti wassti commented Sep 29, 2021

Copy link
Copy Markdown

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 ;)

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 mdhardenburgh left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The style I use is
if
{

}


int main()
{
PeripheralController myGpioController1(gpioController::gpioController1BaseAddress);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same stylistic comments as with the keyboard_emu.cpp file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants