Schwabe/silence register warnings clang (#3940)

* Ignore deprecated register warning for the the STM include files

Ignore the warning with the use of #pragma which is not elegant but otherwise we would have to change the vendor files

* Remove usage of register in C/C++ files.

Modern compilers ignore it anyway and C++11 actually deprecates it. Removing also removes a number of clang warnings about this
This commit is contained in:
Arne Schwabe
2016-10-21 00:09:54 +02:00
committed by Bertrand Songis
parent ba824537d4
commit ad8cd2546e
21 changed files with 140 additions and 116 deletions
+6 -6
View File
@@ -31,8 +31,8 @@ const int8_t volumeScale[VOLUME_LEVEL_MAX+1] =
void setSampleRate(uint32_t frequency)
{
register Tc *ptc ;
register uint32_t timer ;
Tc *ptc ;
uint32_t timer ;
timer = Master_frequency / (8 * frequency) ; // MCK/8 and 100 000 Hz
if (timer > 65535)
@@ -50,8 +50,8 @@ void setSampleRate(uint32_t frequency)
// Start TIMER1 at 100000Hz, used for DACC trigger
void dacTimerStart()
{
register Tc *ptc ;
register uint32_t timer ;
Tc *ptc ;
uint32_t timer ;
// Enable peripheral clock TC0 = bit 23 thru TC5 = bit 28
PMC->PMC_PCER0 |= 0x01000000L ; // Enable peripheral clock to TC1
@@ -78,7 +78,7 @@ void dacInit()
PMC->PMC_PCER0 |= 0x40000000L ; // Enable peripheral clock to DAC
register Dacc *dacptr = DACC;
Dacc *dacptr = DACC;
#if defined(REVA)
dacptr->DACC_MR = 0x0B010215L ; // 0000 1011 0000 0001 0000 0010 0001 0101
@@ -137,7 +137,7 @@ extern "C" void DAC_IRQHandler()
// Sound routines
void audioInit()
{
register Pio *pioptr ;
Pio *pioptr ;
dacInit() ;