1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

_NOCCM renamed to __DMA (which is 32bits aligned on Sky9x/9XR-PRO)

This commit is contained in:
Bertrand Songis 2015-08-08 00:16:51 +02:00
parent e136905e75
commit 4b0841b17d
6 changed files with 14 additions and 17 deletions

View file

@ -475,12 +475,7 @@ const int16_t alawTable[256] = { -5504, -5248, -6016, -5760, -4480, -4224, -4992
const int16_t ulawTable[256] = { -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956, -23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764, -15996, -15484, -14972, -14460, -13948, -13436, -12924, -12412, -11900, -11388, -10876, -10364, -9852, -9340, -8828, -8316, -7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140, -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092, -3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004, -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980, -1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436, -1372, -1308, -1244, -1180, -1116, -1052, -988, -924, -876, -844, -812, -780, -748, -716, -684, -652, -620, -588, -556, -524, -492, -460, -428, -396, -372, -356, -340, -324, -308, -292, -276, -260, -244, -228, -212, -196, -180, -164, -148, -132, -120, -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 32124, 31100, 30076, 29052, 28028, 27004, 25980, 24956, 23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764, 15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412, 11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316, 7932, 7676, 7420, 7164, 6908, 6652, 6396, 6140, 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092, 3900, 3772, 3644, 3516, 3388, 3260, 3132, 3004, 2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980, 1884, 1820, 1756, 1692, 1628, 1564, 1500, 1436, 1372, 1308, 1244, 1180, 1116, 1052, 988, 924, 876, 844, 812, 780, 748, 716, 684, 652, 620, 588, 556, 524, 492, 460, 428, 396, 372, 356, 340, 324, 308, 292, 276, 260, 244, 228, 212, 196, 180, 164, 148, 132, 120, 112, 104, 96, 88, 80, 72, 64, 56, 48, 40, 32, 24, 16, 8, 0 }; const int16_t ulawTable[256] = { -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956, -23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764, -15996, -15484, -14972, -14460, -13948, -13436, -12924, -12412, -11900, -11388, -10876, -10364, -9852, -9340, -8828, -8316, -7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140, -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092, -3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004, -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980, -1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436, -1372, -1308, -1244, -1180, -1116, -1052, -988, -924, -876, -844, -812, -780, -748, -716, -684, -652, -620, -588, -556, -524, -492, -460, -428, -396, -372, -356, -340, -324, -308, -292, -276, -260, -244, -228, -212, -196, -180, -164, -148, -132, -120, -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 32124, 31100, 30076, 29052, 28028, 27004, 25980, 24956, 23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764, 15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412, 11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316, 7932, 7676, 7420, 7164, 6908, 6652, 6396, 6140, 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092, 3900, 3772, 3644, 3516, 3388, 3260, 3132, 3004, 2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980, 1884, 1820, 1756, 1692, 1628, 1564, 1500, 1436, 1372, 1308, 1244, 1180, 1116, 1052, 988, 924, 876, 844, 812, 780, 748, 716, 684, 652, 620, 588, 556, 524, 492, 460, 428, 396, 372, 356, 340, 324, 308, 292, 276, 260, 244, 228, 212, 196, 180, 164, 148, 132, 120, 112, 104, 96, 88, 80, 72, 64, 56, 48, 40, 32, 24, 16, 8, 0 };
AudioQueue audioQueue; AudioQueue audioQueue;
AudioBuffer audioBuffers[AUDIO_BUFFER_COUNT] __DMA;
#if defined(PCBSKY9X)
AudioBuffer audioBuffers[AUDIO_BUFFER_COUNT] __attribute__((aligned(32)));
#else
AudioBuffer audioBuffers[AUDIO_BUFFER_COUNT] _NOCCM;
#endif
AudioQueue::AudioQueue() AudioQueue::AudioQueue()
{ {

View file

@ -38,11 +38,11 @@
#include "../../timers.h" #include "../../timers.h"
#if defined(REVPLUS) && defined(LCD_DUAL_BUFFER) #if defined(REVPLUS) && defined(LCD_DUAL_BUFFER)
display_t displayBuf1[DISPLAY_BUF_SIZE] _NOCCM; display_t displayBuf1[DISPLAY_BUF_SIZE] __DMA;
display_t displayBuf2[DISPLAY_BUF_SIZE] _NOCCM; display_t displayBuf2[DISPLAY_BUF_SIZE] __DMA;
display_t * displayBuf = displayBuf1; display_t * displayBuf = displayBuf1;
#else #else
display_t displayBuf[DISPLAY_BUF_SIZE] _NOCCM; display_t displayBuf[DISPLAY_BUF_SIZE] __DMA;
#endif #endif
void lcd_clear() void lcd_clear()

View file

@ -212,10 +212,12 @@
#define ROTARY_ENCODER_NAVIGATION #define ROTARY_ENCODER_NAVIGATION
#endif #endif
#if defined(STM32F4) #if defined(PCBSKY9X)
#define _NOCCM __attribute__((section(".ram"))) #define __DMA __attribute__((aligned(32)))
#elif defined(STM32F4)
#define __DMA __attribute__((section(".ram")))
#else #else
#define _NOCCM #define __DMA
#endif #endif
#if defined(SIMU) || defined(CPUARM) || GCC_VERSION < 472 #if defined(SIMU) || defined(CPUARM) || GCC_VERSION < 472

View file

@ -41,8 +41,8 @@ uint8_t s_current_protocol[NUM_MODULES] = { MODULES_INIT(255) };
uint16_t failsafeCounter[NUM_MODULES] = { MODULES_INIT(100) }; uint16_t failsafeCounter[NUM_MODULES] = { MODULES_INIT(100) };
uint8_t moduleFlag[NUM_MODULES] = { 0 }; uint8_t moduleFlag[NUM_MODULES] = { 0 };
ModulePulsesData modulePulsesData[NUM_MODULES] _NOCCM; ModulePulsesData modulePulsesData[NUM_MODULES] __DMA;
TrainerPulsesData trainerPulsesData _NOCCM; TrainerPulsesData trainerPulsesData __DMA;
void setupPulses(unsigned int port) void setupPulses(unsigned int port)
{ {

View file

@ -66,7 +66,7 @@
#define NUMBER_ANALOG_ADC1 10 #define NUMBER_ANALOG_ADC1 10
#endif #endif
uint16_t Analog_values[NUMBER_ANALOG] _NOCCM; uint16_t Analog_values[NUMBER_ANALOG] __DMA;
void adcInit() void adcInit()
{ {

View file

@ -232,7 +232,7 @@ void release_spi (void)
#ifdef SD_USE_DMA #ifdef SD_USE_DMA
#if defined(STM32F4) #if defined(STM32F4)
WORD rw_workbyte[1] _NOCCM; WORD rw_workbyte[1] __DMA;
#endif #endif
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
@ -409,7 +409,7 @@ void power_off (void)
/*-----------------------------------------------------------------------*/ /*-----------------------------------------------------------------------*/
#if defined(SD_USE_DMA) && defined(STM32F4) #if defined(SD_USE_DMA) && defined(STM32F4)
uint8_t sd_buff[512] _NOCCM; uint8_t sd_buff[512] __DMA;
#endif #endif
static static