A bug was detected when the uint8_t SUBGRF_GetFskBandwidthRegValue( uint32_t bandwidth )
is called and the bandwith argument has a value of 0.
Comparing the code to the STMCubeWL 1.1 we can see that an if statement is missing to
address the condition where bandwith is equal to 0.
Added the if statement to the radio driver to account for this edge case.
To actually get the filename in the error reporting struct instead of
the start of the path, let's use the MBED_FILENAME macro that MBED_ERROR
et al uses.
Use uint16_t variables for i2c slave_rx_buffer_size and slave_rx_count
variables. This allows to receive more than 255 bytes in slave mode. The
bytes are received one by one in slave mode so there are no hardware
limitations forcing a 1 byte rx count limit.
The HAL gpio_irq_api stores object IDs, which serve as a form of context
for the dispatch of the interrupt handler in the drivers level
InterruptIn Class. The way this is achieved is that the InterruptIn
Class casts its address to uint32_t, which is stored as the ID.
This results in compilation failure when the size of an object pointer
is greater than uint32_t, for example when building on a PC for unit
testing.
In order to allow Unit Testing of the InterruptIn Class, we replace the
use of uint32_t with uintptr_t (type capable of holding a pointer),
which allows portability and expresses intentions more clearly.
In aid of this latter goal, we also replace the use of the name "id"
with "context", to improve clarity - these are addresses of the context
related to that callback.
By default, HAL functions (HAL_SPI_TransmitReceive_IT/HAL_SPI_Transmit_IT/HAL_SPI_Receive_IT) assume that SPI is disabled between function invocation.
It's needed to set transfer size (CR2 register), that can be modified only if SPI disabled. But `stm32_spi_api.c` keeps SPI enabled after initialization.
This commit adds helper code for STM32H7 (SPI_IP_VERSION_V2) that disables SPI before HAL_SPI_TransmitReceive_IT/HAL_SPI_Transmit_IT/HAL_SPI_Receive_IT
and after end of transaction for HAL API compatibility.
Update SPI logic to process 16 bit words in the same way by sync/async,
3/4 wires modes:
- fix 3-wire synchronous transmission to move 2 or more bytes between buffer and
SPI register per word tarnsmission
- fix 4-wire synchronous transmission to move 2 or more bytes between buffer and
SPI register per word tarnsmission
[Warning] serial_device.c@657,41: comparison of different enumeration types ('PinName' and 'UARTName') [-Wenum-compare]
[Warning] serial_device.c@666,41: comparison of different enumeration types ('PinName' and 'UARTName') [-Wenum-compare]
[Warning] serial_device.c@675,41: comparison of different enumeration types ('PinName' and 'UARTName') [-Wenum-compare]
[Warning] serial_device.c@676,41: comparison of different enumeration types ('PinName' and 'UARTName') [-Wenum-compare]
[Warning] serial_device.c@644,41: comparison of integer expressions of different signedness: 'PinName' and 'enum <anonymous>' [-Wsign-compare]
[Warning] serial_device.c@644,41: comparison between 'PinName' and 'enum <anonymous>' [-Wenum-compare]
[Warning] serial_device.c@653,41: comparison of integer expressions of different signedness: 'PinName' and 'enum <anonymous>' [-Wsign-compare]
[Warning] serial_device.c@653,41: comparison between 'PinName' and 'enum <anonymous>' [-Wenum-compare]
[Warning] serial_device.c@662,41: comparison of integer expressions of different signedness: 'PinName' and 'enum <anonymous>' [-Wsign-compare]
[Warning] serial_device.c@662,41: comparison between 'PinName' and 'enum <anonymous>' [-Wenum-compare]
[Warning] serial_device.c@663,41: comparison of integer expressions of different signedness: 'PinName' and 'enum <anonymous>' [-Wsign-compare]
[Warning] serial_device.c@663,41: comparison between 'PinName' and 'enum <anonymous>' [-Wenum-compare]
[Warning] stm32g4xx_hal_hrtim.c@1817,21: equality comparison with extraneous parentheses [-Wparentheses-equality]
[Warning] stm32g4xx_hal_hrtim.c@1821,21: equality comparison with extraneous parentheses [-Wparentheses-equality]
[Warning] stm32g4xx_hal_hrtim.c@2461,21: equality comparison with extraneous parentheses [-Wparentheses-equality]
[Warning] stm32g4xx_hal_hrtim.c@2465,21: equality comparison with extraneous parentheses [-Wparentheses-equality]
[Warning] stm32g4xx_hal_hrtim.c@6600,21: equality comparison with extraneous parentheses [-Wparentheses-equality]
[Warning] stm32g4xx_hal_hrtim.c@7162,21: equality comparison with extraneous parentheses [-Wparentheses-equality]
[Warning] stm32g4xx_hal_hrtim.c@7166,21: equality comparison with extraneous parentheses [-Wparentheses-equality]