ezieragabriel / arduino

Automatically exported from code.google.com/p/arduino
Other
0 stars 0 forks source link

Better documentation in pins_arduino.h #1055

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. There have been requests for a tutorial on modifying pins_arduino.h to meet 
the needs of custom-designed boards.
2. pins_arduino.h is not well documented internally.

The attached diffs add a bunch of comments (only!  No actual code changes!) to 
variants/standard/pins_arduino.h explaining what it does and approximately how 
it works.  This should make it a bit less confusing for a moderately skilled 
programmer to make their own variant.

Original issue reported on code.google.com by wes...@gmail.com on 30 Sep 2012 at 8:09

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thank you for adding these comments.

Wouldn't it be better to assign values the the symbols 
SS,MOSI,MISO,SCK,SDA,SCL, A0,A1,A2 with the compiler directive define instead 
of static const uint8_t ?
For example
#define SS 10

This not only does not use any memory(not even flash),
but also allows the compiler to better optimize code generation.

Original comment by jaguar3s...@gmail.com on 30 Sep 2012 at 9:10