Closed
Description
Format and frequency is set 2x when new SPI object is created.
From SPI ctor:
spi_init(&_spi, mosi, miso, sclk, NC);
spi_format(&_spi, _bits, _mode, 0);
spi_frequency(&_spi, _hz);
And in the spi_init() for most targets:
// set default format and frequency
if (ssel == NC) {
spi_format(obj, 8, 0, 0); // 8 bits, mode 0, master
} else {
spi_format(obj, 8, 0, 1); // 8 bits, mode 0, slave
}
spi_frequency(obj, 1000000);
This is a result of a PR #930 which was closed as ssel argument for SPI/SPISlave is not properly used. The main problem is to use ssel parameter in the HAL as slave/master selector.
Metadata
Metadata
Assignees
Labels
No labels