On 17/11/16 05:15, will sanfilippo wrote:
There is an easy way to prevent this as well which should be added to
syscfg.yml. The following works:
SPI_0_MASTER:
description: 'SPI 0 master'
value: 1
restrictions:
- "!SPI_0_SLAVE"
SPI_0_SLAVE:
description: 'SPI 0 slave'
value: 1
restrictions:
- "!SPI_0_MASTER"
The newt tool generates a nice error message:
Error: Syscfg restriction violations detected:
SPI_0_MASTER=1 requires SPI_0_SLAVE not be set, but SPI_0_SLAVE=1
SPI_0_SLAVE=1 requires SPI_0_MASTER not be set, but SPI_0_MASTER=1
Setting history (newest -> oldest):
SPI_0_MASTER: [hw/bsp/nrf52dk:1]
SPI_0_SLAVE: [hw/bsp/nrf52dk:1]
I wasn't aware of the restrictions flag, that's nice to know about.
Should I submit a pull request to resolve the conflict in master, though
(for at least the nRF52DK, I haven' t checked the other BSP packages)?
I'd propose only enabling SPI_0_MASTER by default, but I'm perhaps
missing some specific intentions with this as well (having both MASTER
and SLAVE enabled in the BSP).