按驱动的函数名字,matrix可以运行了
This commit is contained in:
@@ -45,11 +45,11 @@ const uint8_t tile[] = {2, 7};
|
||||
|
||||
// 常见颜色定义
|
||||
|
||||
const RGBColor_TypeDef DARK = {0, 0, 0};
|
||||
const RGBColor_TypeDef GREEN = {255, 0, 0};
|
||||
const RGBColor_TypeDef RED = {0, 255, 0};
|
||||
const RGBColor_TypeDef BLUE = {0, 0, 255};
|
||||
const RGBColor_TypeDef WHITE = {255, 255, 255};
|
||||
const RGBColor_TypeDef LED_DARK = {0, 0, 0};
|
||||
const RGBColor_TypeDef LED_GREEN = {255, 0, 0};
|
||||
const RGBColor_TypeDef LED_RED = {0, 255, 0};
|
||||
const RGBColor_TypeDef LED_BLUE = {0, 0, 255};
|
||||
const RGBColor_TypeDef LED_WHITE = {255, 255, 255};
|
||||
const RGBColor_TypeDef LT_RED = {0, 32, 0};
|
||||
const RGBColor_TypeDef LT_GREEN = {32, 0, 0};
|
||||
const RGBColor_TypeDef LT_BLUE = {0, 0, 32};
|
||||
@@ -247,16 +247,16 @@ void led_matrix_fill_test(uint8_t index)
|
||||
void led_matrix_test1()
|
||||
{
|
||||
rt_memset(RGB_Data, 0x00, sizeof(RGB_Data));
|
||||
Set_LEDColor(0, RED);
|
||||
Set_LEDColor(1, GREEN);
|
||||
Set_LEDColor(2, BLUE);
|
||||
Set_LEDColor(3, RED);
|
||||
Set_LEDColor(4, GREEN);
|
||||
Set_LEDColor(5, BLUE);
|
||||
Set_LEDColor(6, RED);
|
||||
Set_LEDColor(7, GREEN);
|
||||
Set_LEDColor(8, BLUE);
|
||||
Set_LEDColor(9, WHITE);
|
||||
Set_LEDColor(0, LED_RED);
|
||||
Set_LEDColor(1, LED_GREEN);
|
||||
Set_LEDColor(2, LED_BLUE);
|
||||
Set_LEDColor(3, LED_RED);
|
||||
Set_LEDColor(4, LED_GREEN);
|
||||
Set_LEDColor(5, LED_BLUE);
|
||||
Set_LEDColor(6, LED_RED);
|
||||
Set_LEDColor(7, LED_GREEN);
|
||||
Set_LEDColor(8, LED_BLUE);
|
||||
Set_LEDColor(9, LED_WHITE);
|
||||
// led_matrix_rst();
|
||||
RGB_Reflash();
|
||||
}
|
||||
@@ -265,22 +265,22 @@ MSH_CMD_EXPORT(led_matrix_test1, Test led matrix on board)
|
||||
void led_matrix_test2()
|
||||
{
|
||||
rt_memset(RGB_Data, 0x00, sizeof(RGB_Data));
|
||||
Set_LEDColor(0, BLUE);
|
||||
Set_LEDColor(1, RED);
|
||||
Set_LEDColor(2, GREEN);
|
||||
Set_LEDColor(3, BLUE);
|
||||
Set_LEDColor(4, RED);
|
||||
Set_LEDColor(5, GREEN);
|
||||
Set_LEDColor(6, BLUE);
|
||||
Set_LEDColor(7, RED);
|
||||
Set_LEDColor(8, GREEN);
|
||||
Set_LEDColor(9, RED);
|
||||
Set_LEDColor(0, LED_BLUE);
|
||||
Set_LEDColor(1, LED_RED);
|
||||
Set_LEDColor(2, LED_GREEN);
|
||||
Set_LEDColor(3, LED_BLUE);
|
||||
Set_LEDColor(4, LED_RED);
|
||||
Set_LEDColor(5, LED_GREEN);
|
||||
Set_LEDColor(6, LED_BLUE);
|
||||
Set_LEDColor(7, LED_RED);
|
||||
Set_LEDColor(8, LED_GREEN);
|
||||
Set_LEDColor(9, LED_RED);
|
||||
|
||||
Set_LEDColor(14, GREEN);
|
||||
Set_LEDColor(15, GREEN);
|
||||
Set_LEDColor(16, BLUE);
|
||||
Set_LEDColor(17, RED);
|
||||
Set_LEDColor(18, WHITE);
|
||||
Set_LEDColor(14, LED_GREEN);
|
||||
Set_LEDColor(15, LED_GREEN);
|
||||
Set_LEDColor(16, LED_BLUE);
|
||||
Set_LEDColor(17, LED_RED);
|
||||
Set_LEDColor(18, LED_WHITE);
|
||||
|
||||
RGB_Reflash();
|
||||
}
|
||||
|
@@ -9,12 +9,11 @@ typedef struct RGBColor_TypeDef
|
||||
uint8_t B;
|
||||
} RGBColor_TypeDef; // 颜色结构体
|
||||
|
||||
extern const RGBColor_TypeDef DARK;
|
||||
extern const RGBColor_TypeDef GREEN;
|
||||
extern const RGBColor_TypeDef RED;
|
||||
extern const RGBColor_TypeDef BLUE;
|
||||
extern const RGBColor_TypeDef WHITE;
|
||||
|
||||
extern const RGBColor_TypeDef LED_DARK;
|
||||
extern const RGBColor_TypeDef LED_GREEN;
|
||||
extern const RGBColor_TypeDef LED_RED;
|
||||
extern const RGBColor_TypeDef LED_BLUE;
|
||||
extern const RGBColor_TypeDef LED_WHITE;
|
||||
extern void Set_LEDColor(uint16_t LedId, RGBColor_TypeDef Color);
|
||||
extern void RGB_Reflash(void);
|
||||
extern void led_matrix_rst();
|
||||
|
Reference in New Issue
Block a user