diff --git a/STM32/cores/arduino/stm32/SerialUART.cpp b/STM32/cores/arduino/stm32/SerialUART.cpp index d1db7ba..828e356 100644 --- a/STM32/cores/arduino/stm32/SerialUART.cpp +++ b/STM32/cores/arduino/stm32/SerialUART.cpp @@ -94,7 +94,7 @@ void SerialUART::begin(const uint32_t baud) { } #endif - stm32_af_uart_init(instance, rxPort, rxPin, txPort, txPin); + stm32AfUARTInit(instance, rxPort, rxPin, txPort, txPin); handle->Init.BaudRate = baud; handle->Init.WordLength = UART_WORDLENGTH_8B; @@ -141,12 +141,12 @@ size_t SerialUART::write(const uint8_t c) { return 1; } -void SerialUART::stm32_set_rx(uint8_t rx) { +void SerialUART::stm32SetRX(uint8_t rx) { rxPort = port_pin_list[rx].port; rxPin = port_pin_list[rx].pin_mask; } -void SerialUART::stm32_set_tx(uint8_t tx) { +void SerialUART::stm32SetTX(uint8_t tx) { txPort = port_pin_list[tx].port; txPin = port_pin_list[tx].pin_mask; } diff --git a/STM32/cores/arduino/stm32/SerialUART.h b/STM32/cores/arduino/stm32/SerialUART.h index 9afd94c..79b3359 100644 --- a/STM32/cores/arduino/stm32/SerialUART.h +++ b/STM32/cores/arduino/stm32/SerialUART.h @@ -20,8 +20,8 @@ class SerialUART : public Stream { using Print::write; // pull in write(str) and write(buf, size) from Print operator bool() { return true; }; // UART always active - void stm32_set_rx(uint8_t rx); - void stm32_set_tx(uint8_t tx); + void stm32SetRX(uint8_t rx); + void stm32SetTX(uint8_t tx); USART_TypeDef *instance = NULL; UART_HandleTypeDef *handle = NULL; diff --git a/STM32/cores/arduino/stm32/stm32_ADC.c b/STM32/cores/arduino/stm32/stm32_ADC.c index f99239b..3bb8219 100644 --- a/STM32/cores/arduino/stm32/stm32_ADC.c +++ b/STM32/cores/arduino/stm32/stm32_ADC.c @@ -73,7 +73,7 @@ int analogRead(uint8_t pin) { } ADC_ChannelConfTypeDef sConfig; - sConfig.Channel = stm32_adc1_get_channel(port_pin_list[pin].port, port_pin_list[pin].pin_mask); + sConfig.Channel = stm32ADC1GetChannel(port_pin_list[pin].port, port_pin_list[pin].pin_mask); sConfig.Rank = 1; #if STM32L0 diff --git a/STM32/cores/arduino/stm32/stm32_def.h b/STM32/cores/arduino/stm32/stm32_def.h index c86e178..8d7cdae 100644 --- a/STM32/cores/arduino/stm32/stm32_def.h +++ b/STM32/cores/arduino/stm32/stm32_def.h @@ -31,7 +31,7 @@ #include "stm32l4xx.h" #include "stm32l4xx_hal.h" #else - #error "STM32XX is not definedin boards.txt" + #error "STM32XX is not defined in boards.txt" #endif diff --git a/STM32/cores/arduino/stm32/stm32_gpio_af.c b/STM32/cores/arduino/stm32/stm32_gpio_af.c index c165c26..e1e6077 100644 --- a/STM32/cores/arduino/stm32/stm32_gpio_af.c +++ b/STM32/cores/arduino/stm32/stm32_gpio_af.c @@ -2,7 +2,7 @@ #include CHIP_PERIPHERAL_INCLUDE -GPIO_TypeDef *stm32_af_default(stm32_af_pin_list_type list[], int size, const void *instance, uint32_t *pin) { +GPIO_TypeDef *stm32AfGetDefault(stm32_af_pin_list_type list[], int size, const void *instance, uint32_t *pin) { for(int i=0; i Example: set up SPI2 -`SPIClass SPI_2(SPI2, Pmosi, Piso, Psck);` +`SPIClass SPI_2(SPI2, mosi, iso, sck);` #### **`SPI.begin()`** @@ -105,22 +105,22 @@ TODO not yet implemented TODO write doc -#### **`SPI.stm32_set_mosi(uint8_t pin);`** +#### **`SPI.stm32SetMOSI(uint8_t pin);`** TODO write doc This method must be called before begin()! -#### **`SPI.stm32_set_miso(uint8_t pin);`** +#### **`SPI.stm32SetMISO(uint8_t pin);`** TODO write doc This method must be called before begin()! -#### **`SPI.stm32_set_sck(uint8_t pin);`** +#### **`SPI.stm32SetSCK(uint8_t pin);`** TODO write doc This method must be called before begin()! -#### **`SPI.stm32_set_instance(...);`** +#### **`SPI.stm32SetInstance(...);`** TODO implement This method must be called before begin()!