Minor rearranging of options and added static smile
This commit is contained in:
@@ -79,6 +79,7 @@ void LEDDesign_ColorGreen(void);
|
||||
void LEDDesign_ColorRed(void);
|
||||
void LEDDesign_Crazy(void);
|
||||
void LEDDesign_Smile(void);
|
||||
void LEDDesign_Smile_Audio(void);
|
||||
void LEDDesign_SuperCrazy(void);
|
||||
uint8_t lookupLED(uint8_t column, uint8_t row);
|
||||
void setLED(uint8_t pixelNumber, uint8_t redLevel, uint8_t greenLevel, uint8_t blueLevel);
|
||||
@@ -88,14 +89,7 @@ void updateWS2812BData(void);
|
||||
|
||||
/* Private user code ---------------------------------------------------------*/
|
||||
/* USER CODE BEGIN 0 */
|
||||
int _write(int32_t file, uint8_t *ptr, int32_t len)
|
||||
{
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
ITM_SendChar(*ptr++);
|
||||
}
|
||||
return len;
|
||||
}
|
||||
|
||||
/* USER CODE END 0 */
|
||||
|
||||
/**
|
||||
@@ -148,21 +142,24 @@ int main(void)
|
||||
LEDDesign_Smile();
|
||||
break;
|
||||
case 1:
|
||||
LEDDesign_Crazy();
|
||||
LEDDesign_Smile_Audio();
|
||||
break;
|
||||
case 2:
|
||||
LEDDesign_SuperCrazy();
|
||||
LEDDesign_Crazy();
|
||||
break;
|
||||
case 3:
|
||||
LEDDesign_ColorWhite();
|
||||
LEDDesign_SuperCrazy();
|
||||
break;
|
||||
case 4:
|
||||
LEDDesign_ColorRed();
|
||||
LEDDesign_ColorWhite();
|
||||
break;
|
||||
case 5:
|
||||
LEDDesign_ColorGreen();
|
||||
LEDDesign_ColorRed();
|
||||
break;
|
||||
case 6:
|
||||
LEDDesign_ColorGreen();
|
||||
break;
|
||||
case 7:
|
||||
LEDDesign_ColorBlue();
|
||||
break;
|
||||
default:
|
||||
@@ -711,6 +708,72 @@ void LEDDesign_Crazy(void){
|
||||
}
|
||||
}
|
||||
void LEDDesign_Smile(void){
|
||||
setLED(lookupLED(0,0), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(0,1), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(0,2), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(0,3), 0x00, 0x00, 0x7F);
|
||||
setLED(lookupLED(0,4), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(0,5), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(0,6), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(0,7), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(1,0), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(1,1), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(1,2), 0x00, 0x00, 0x7F);
|
||||
setLED(lookupLED(1,3), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(1,4), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(1,5), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(1,6), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(1,7), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(2,0), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(2,1), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(2,2), 0x00, 0x00, 0x7F);
|
||||
setLED(lookupLED(2,3), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(2,4), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(2,5), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(2,6), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(2,7), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(3,0), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(3,1), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(3,2), 0x00, 0x00, 0x7F);
|
||||
setLED(lookupLED(3,3), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(3,4), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(3,5), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(3,6), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(3,7), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(4,0), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(4,1), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(4,2), 0x00, 0x00, 0x7F);
|
||||
setLED(lookupLED(4,3), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(4,4), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(4,5), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(4,6), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(4,7), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(5,0), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(5,1), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(5,2), 0x00, 0x00, 0x7F);
|
||||
setLED(lookupLED(5,3), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(5,4), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(5,5), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(5,6), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(5,7), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(6,0), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(6,1), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(6,2), 0x00, 0x00, 0x7F);
|
||||
setLED(lookupLED(6,3), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(6,4), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(6,5), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(6,6), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(6,7), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(7,0), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(7,1), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(7,2), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(7,3), 0x00, 0x00, 0x7F);
|
||||
setLED(lookupLED(7,4), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(7,5), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(7,6), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(7,7), 0x00, 0x00, 0x00);
|
||||
}
|
||||
void LEDDesign_Smile_Audio(void){
|
||||
uint8_t currentSoundLevel = getSoundLevel();
|
||||
setLED(lookupLED(0,0), 0x00, 0x00, 0x00);
|
||||
setLED(lookupLED(0,1), 0x00, 0x00, 0x00);
|
||||
|
||||
@@ -226,7 +226,7 @@ void TIM6_DAC_IRQHandler(void)
|
||||
/* USER CODE END TIM6_DAC_IRQn 0 */
|
||||
HAL_TIM_IRQHandler(&htim6);
|
||||
/* USER CODE BEGIN TIM6_DAC_IRQn 1 */
|
||||
LEDMode = (LEDMode + 1) % 7;
|
||||
LEDMode = (LEDMode + 1) % 8;
|
||||
LEDDesign_PendingChange = false;
|
||||
/* USER CODE END TIM6_DAC_IRQn 1 */
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,21 +1,20 @@
|
||||
core_cm4.h:2064:26:ITM_SendChar 16 static,ignoring_inline_asm
|
||||
main.c:91:5:_write 32 static
|
||||
main.c:105:5:main 8 static
|
||||
main.c:184:6:SystemClock_Config 88 static
|
||||
main.c:228:13:MX_ADC3_Init 24 static
|
||||
main.c:278:13:MX_SPI4_Init 8 static
|
||||
main.c:316:13:MX_TIM6_Init 16 static
|
||||
main.c:358:13:MX_GPIO_Init 64 static
|
||||
main.c:621:9:getSoundLevel 24 static
|
||||
main.c:658:6:LEDDesign_Off 16 static
|
||||
main.c:665:6:LEDDesign_ColorWhite 16 static
|
||||
main.c:672:6:LEDDesign_ColorBlue 16 static
|
||||
main.c:683:6:LEDDesign_ColorGreen 16 static
|
||||
main.c:694:6:LEDDesign_ColorRed 16 static
|
||||
main.c:705:6:LEDDesign_Crazy 32 static
|
||||
main.c:713:6:LEDDesign_Smile 24 static
|
||||
main.c:780:6:LEDDesign_SuperCrazy 24 static
|
||||
main.c:795:9:lookupLED 16 static
|
||||
main.c:1024:6:setLED 16 static
|
||||
main.c:1029:6:updateWS2812BData 16 static
|
||||
main.c:1146:6:Error_Handler 4 static
|
||||
main.c:99:5:main 8 static
|
||||
main.c:181:6:SystemClock_Config 88 static
|
||||
main.c:225:13:MX_ADC3_Init 24 static
|
||||
main.c:275:13:MX_SPI4_Init 8 static
|
||||
main.c:313:13:MX_TIM6_Init 16 static
|
||||
main.c:355:13:MX_GPIO_Init 64 static
|
||||
main.c:618:9:getSoundLevel 24 static
|
||||
main.c:655:6:LEDDesign_Off 16 static
|
||||
main.c:662:6:LEDDesign_ColorWhite 16 static
|
||||
main.c:669:6:LEDDesign_ColorBlue 16 static
|
||||
main.c:680:6:LEDDesign_ColorGreen 16 static
|
||||
main.c:691:6:LEDDesign_ColorRed 16 static
|
||||
main.c:702:6:LEDDesign_Crazy 32 static
|
||||
main.c:710:6:LEDDesign_Smile 8 static
|
||||
main.c:776:6:LEDDesign_Smile_Audio 24 static
|
||||
main.c:843:6:LEDDesign_SuperCrazy 24 static
|
||||
main.c:858:9:lookupLED 16 static
|
||||
main.c:1087:6:setLED 16 static
|
||||
main.c:1092:6:updateWS2812BData 16 static
|
||||
main.c:1209:6:Error_Handler 4 static
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user