monome / libavr32

GNU General Public License v2.0
15 stars 27 forks source link

SPI peripheral/CS naming issues #1

Closed catfact closed 7 years ago

catfact commented 8 years ago

encountered this discrepancy when refactoring aleph for building against libavr32

in aleph board conf header (https://github.com/tehn/aleph/blob/dev/avr32_lib/conf/aleph_board.h#L82) we stick to the ASF conventions when defining the address of an SPI peripheral:

#define ADC_SPI (&AVR32_SPI1)

and defining a chip select index:

#define ADC_SPI_NPCS 0

in skeleton/system/libavr32, there is only one SPIperipheral definition, and ADC_SPIetc are defined as the chip select numbers and not as peripheral addresses. like so: https://github.com/monome/libavr32/blob/master/conf/teletype/conf_board.h#L138

i can't see the reason for this change, which breaks all the drivers and muddies a perfectly clear naming convention.

i would like to:

and while i'm at it:

samdoshi commented 8 years ago

Both of these sound good to me.

Add a CHANGELOG.md file when you make the changes so that they can be tracked easily.

catfact commented 7 years ago

we kind of stalled out on the aleph refactor (it's basically done on a branch, but hasn't been properly tested)

but we did change the pin defines with PR #18 and related. i didn't bother refactoring TT code. closing this anyway since it's been over a year