@ -25,7 +25,7 @@ extern "C" {
/** This is the spi hardware channel class*/
void spi_initMaster(spiCH_t spi_hw_ch);
void spi_init(spiCH_t spi_hw_ch);
/*!
@ -4,7 +4,7 @@
// https://controllerstech.com/spi-using-registers-in-stm32/
void spi_initMater(spiCH_t spi_hw_ch)
void spi_init(spiCH_t spi_hw_ch)
{
RCC->APB2ENR |= (1<<12); // Enable SPI1 CLock
@ -76,8 +76,9 @@ int main(int argc, char *argv[])
pinWrite(pinB3,0);
spi_initMaster(SPI_CH_1);
spi_init(SPI_CH_1);
for(i = 10; i > 0; i--) {
pinToggle(pinB3);
spi_trx(SPI_CH_1, 0xAE);
}