Skip to content

Commit

Permalink
fix compiler errors generated by more stringent flags in Makefile:
Browse files Browse the repository at this point in the history
- use volatile for registers
- avoid implicit casts
  • Loading branch information
mtowara committed Apr 17, 2017
1 parent f6095c9 commit 150b15c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Marlin/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ bool endstop_monitor_flag = false;

// manually add pins that have names that are macros which don't play well with these macros
#if SERIAL_PORT == 0 && (AVR_ATmega2560_FAMILY || AVR_ATmega1284_FAMILY)
static const unsigned char RXD_NAME[] PROGMEM = {"RXD"};
static const unsigned char TXD_NAME[] PROGMEM = {"TXD"};
static const char RXD_NAME[] PROGMEM = {"RXD"};
static const char TXD_NAME[] PROGMEM = {"TXD"};
#endif

/////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -92,11 +92,11 @@ const char* const pin_array[][3] PROGMEM = {
// manually add pins ...
#if SERIAL_PORT == 0
#if AVR_ATmega2560_FAMILY
{RXD_NAME, 0, 1},
{TXD_NAME, 1, 1},
{RXD_NAME, "0", "1"},
{TXD_NAME, "1", "1"},
#elif AVR_ATmega1284_FAMILY
{RXD_NAME, 8, 1},
{TXD_NAME, 9, 1},
{RXD_NAME, "8", "1"},
{TXD_NAME, "9", "1"},
#endif
#endif

Expand Down Expand Up @@ -181,7 +181,7 @@ static bool pwm_status(uint8_t pin) {



const uint8_t* const PWM_other[][3] PROGMEM = {
const volatile uint8_t* const PWM_other[][3] PROGMEM = {
{&TCCR0A, &TCCR0B, &TIMSK0},
{&TCCR1A, &TCCR1B, &TIMSK1},
#if defined(TCCR2A) && defined(COM2A1)
Expand All @@ -199,7 +199,7 @@ const uint8_t* const PWM_other[][3] PROGMEM = {
};


const uint8_t* const PWM_OCR[][3] PROGMEM = {
const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {

#ifdef TIMER0A
{&OCR0A,&OCR0B,0},
Expand Down

0 comments on commit 150b15c

Please sign in to comment.