Skip to content

Commit

Permalink
chore(adc): store constant structs in FLASH (#2551)
Browse files Browse the repository at this point in the history
... not RAM.
  • Loading branch information
raphaelcoeffic authored and pfeerick committed Oct 18, 2022
1 parent cbb9a25 commit c34bac6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions radio/src/targets/common/arm/stm32/stm32_hal_adc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static void adc_setup_scan_mode(ADC_TypeDef* ADCx, uint8_t nconv)
ADC_DMARequestAfterLastTransferCmd(ADCx, ENABLE); // ADC_CR2_DDS
}

stm32_hal_adc_channel ADC_MAIN_channels[] = {
static const stm32_hal_adc_channel ADC_MAIN_channels[] = {
{ADC_CHANNEL_STICK_LH, ADC_SAMPTIME},
{ADC_CHANNEL_STICK_LV, ADC_SAMPTIME},
{ADC_CHANNEL_STICK_RV, ADC_SAMPTIME},
Expand Down Expand Up @@ -228,7 +228,7 @@ static uint16_t* ADC_EXT_get_dma_buffer()
}
#endif

stm32_hal_adc ADC_hal_def[] = {
static const stm32_hal_adc ADC_hal_def[] = {
{
ADC_MAIN,
ADC_DMA_Stream, ADC_DMA_Channel, ADC_MAIN_get_dma_buffer,
Expand Down

0 comments on commit c34bac6

Please sign in to comment.