Fixed inverted LED logic in the USB2AX board LED driver (thanks to Nicolas Saugnier).
This commit is contained in:
		
							parent
							
								
									e875d7cf9f
								
							
						
					
					
						commit
						bd6123e2c1
					
				
					 2 changed files with 17 additions and 16 deletions
				
			
		| 
						 | 
					@ -49,6 +49,7 @@
 | 
				
			||||||
  *   - Fixed compile error if LEDs_Disable() is called and BOARD=NONE is set (thanks to Sam Lin)
 | 
					  *   - Fixed compile error if LEDs_Disable() is called and BOARD=NONE is set (thanks to Sam Lin)
 | 
				
			||||||
  *   - Fixed inverted LED logic in the OLIMEX162 board LED driver
 | 
					  *   - Fixed inverted LED logic in the OLIMEX162 board LED driver
 | 
				
			||||||
  *   - Fixed incorrect reponse to GET STATUS requests in device mode if NO_DEVICE_SELF_POWER or NO_DEVICE_REMOTE_WAKEUP tokens are defined (thanks to Georg Glock)
 | 
					  *   - Fixed incorrect reponse to GET STATUS requests in device mode if NO_DEVICE_SELF_POWER or NO_DEVICE_REMOTE_WAKEUP tokens are defined (thanks to Georg Glock)
 | 
				
			||||||
 | 
					  *   - Fixed inverted LED logic in the USB2AX board LED driver
 | 
				
			||||||
  *  - Library Applications:
 | 
					  *  - Library Applications:
 | 
				
			||||||
  *   - Fixed error in the AVRISP-MKII programmer when ISP mode is used at 64KHz (thanks to Ben R. Porter)
 | 
					  *   - Fixed error in the AVRISP-MKII programmer when ISP mode is used at 64KHz (thanks to Ben R. Porter)
 | 
				
			||||||
  *   - Fixed AVRISP-MKII programmer project failing to compile for the U4 chips when VTARGET_ADC_CHANNEL is defined to an invalid channel and NO_VTARGET_DETECT is
 | 
					  *   - Fixed AVRISP-MKII programmer project failing to compile for the U4 chips when VTARGET_ADC_CHANNEL is defined to an invalid channel and NO_VTARGET_DETECT is
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,13 +54,13 @@
 | 
				
			||||||
 *  <b>USB2AX</b>:
 | 
					 *  <b>USB2AX</b>:
 | 
				
			||||||
 *  <table>
 | 
					 *  <table>
 | 
				
			||||||
 *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
 | 
					 *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
 | 
				
			||||||
 *    <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>Low</td><td>PORTC.6</td></tr>
 | 
					 *    <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTC.6</td></tr>
 | 
				
			||||||
 *  </table>
 | 
					 *  </table>
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  <b>USB2AX_V3</b>:
 | 
					 *  <b>USB2AX_V3</b>:
 | 
				
			||||||
 *  <table>
 | 
					 *  <table>
 | 
				
			||||||
 *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
 | 
					 *    <tr><th>Name</th><th>Color</th><th>Info</th><th>Active Level</th><th>Port Pin</th></tr>
 | 
				
			||||||
 *    <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>Low</td><td>PORTD.1</td></tr>
 | 
					 *    <tr><td>LEDS_LED1</td><td>Green</td><td>General Indicator</td><td>High</td><td>PORTD.1</td></tr>
 | 
				
			||||||
 *  </table>
 | 
					 *  </table>
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 *  @{
 | 
					 *  @{
 | 
				
			||||||
| 
						 | 
					@ -108,11 +108,11 @@
 | 
				
			||||||
			static inline void LEDs_Init(void)
 | 
								static inline void LEDs_Init(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				#if (BOARD == BOARD_USB2AX)
 | 
									#if (BOARD == BOARD_USB2AX)
 | 
				
			||||||
				DDRC  |= LEDS_ALL_LEDS;
 | 
									DDRC  |=  LEDS_ALL_LEDS;
 | 
				
			||||||
				PORTC |= LEDS_ALL_LEDS;				
 | 
									PORTC &= ~LEDS_ALL_LEDS;				
 | 
				
			||||||
				#else
 | 
									#else
 | 
				
			||||||
				DDRD  |= LEDS_ALL_LEDS;
 | 
									DDRD  |=  LEDS_ALL_LEDS;
 | 
				
			||||||
				PORTD |= LEDS_ALL_LEDS;				
 | 
									PORTD &= ~LEDS_ALL_LEDS;				
 | 
				
			||||||
				#endif				
 | 
									#endif				
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -130,27 +130,27 @@
 | 
				
			||||||
			static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOnLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				#if (BOARD == BOARD_USB2AX)
 | 
									#if (BOARD == BOARD_USB2AX)
 | 
				
			||||||
				PORTC &= ~LEDMask;				
 | 
									PORTC |= LEDMask;				
 | 
				
			||||||
				#else
 | 
									#else
 | 
				
			||||||
				PORTD &= ~LEDMask;
 | 
									PORTD |= LEDMask;
 | 
				
			||||||
				#endif
 | 
									#endif
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_TurnOffLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				#if (BOARD == BOARD_USB2AX)
 | 
									#if (BOARD == BOARD_USB2AX)
 | 
				
			||||||
				PORTC |= LEDMask;
 | 
									PORTC &= ~LEDMask;
 | 
				
			||||||
				#else
 | 
									#else
 | 
				
			||||||
				PORTD |= LEDMask;
 | 
									PORTD &= ~LEDMask;
 | 
				
			||||||
				#endif
 | 
									#endif
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
								static inline void LEDs_SetAllLEDs(const uint8_t LEDMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				#if (BOARD == BOARD_USB2AX)
 | 
									#if (BOARD == BOARD_USB2AX)
 | 
				
			||||||
				PORTC = ((PORTC | LEDS_ALL_LEDS) & ~LEDMask);				
 | 
									PORTC = ((PORTC & ~LEDS_ALL_LEDS) | LEDMask);				
 | 
				
			||||||
				#else
 | 
									#else
 | 
				
			||||||
				PORTD = ((PORTD | LEDS_ALL_LEDS) & ~LEDMask);
 | 
									PORTD = ((PORTD & ~LEDS_ALL_LEDS) | LEDMask);
 | 
				
			||||||
				#endif
 | 
									#endif
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -158,9 +158,9 @@
 | 
				
			||||||
			                                   const uint8_t ActiveMask)
 | 
								                                   const uint8_t ActiveMask)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				#if (BOARD == BOARD_USB2AX)
 | 
									#if (BOARD == BOARD_USB2AX)
 | 
				
			||||||
				PORTC = ((PORTC | LEDMask) & ~ActiveMask);				
 | 
									PORTC = ((PORTC & ~LEDMask) | ActiveMask);				
 | 
				
			||||||
				#else
 | 
									#else
 | 
				
			||||||
				PORTD = ((PORTD | LEDMask) & ~ActiveMask);
 | 
									PORTD = ((PORTD & ~LEDMask) | ActiveMask);
 | 
				
			||||||
				#endif
 | 
									#endif
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -177,9 +177,9 @@
 | 
				
			||||||
			static inline uint8_t LEDs_GetLEDs(void)
 | 
								static inline uint8_t LEDs_GetLEDs(void)
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				#if (BOARD == BOARD_USB2AX)
 | 
									#if (BOARD == BOARD_USB2AX)
 | 
				
			||||||
				return (~PORTC & LEDS_ALL_LEDS);				
 | 
									return (PORTC & LEDS_ALL_LEDS);				
 | 
				
			||||||
				#else
 | 
									#else
 | 
				
			||||||
				return (~PORTD & LEDS_ALL_LEDS);
 | 
									return (PORTD & LEDS_ALL_LEDS);
 | 
				
			||||||
				#endif
 | 
									#endif
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		#endif
 | 
							#endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue