many things are different from WP DC29, including but not limited to: - different vendor and core - different peripherals - no external serial number MCU, now have different i2c-communicated MCU - different accelerometer - different RGBLED count - RGBLED controller instead of PWM controller - soft I2C instead of hard I2C - I2C EEPROM instead of SPI Flash code has been "cleaned up" and some work done for porting. the code "builds" but most of the render code isn't actually used yet. there's still a lot to fix between render, UI, and incomplete implementations.
49 lines
585 B
C
49 lines
585 B
C
/*
|
|
* rgbled.h
|
|
*
|
|
* Created on: Oct 13, 2024
|
|
* Author: true
|
|
*/
|
|
|
|
#ifndef USER_LED_RGBLED_H_
|
|
#define USER_LED_RGBLED_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "hsv2rgb.h"
|
|
|
|
#include "../comm/i2c.h"
|
|
|
|
#include "../hw/ch32sub.h"
|
|
|
|
|
|
|
|
#define RGB_EDGE_COUNT 10
|
|
|
|
|
|
|
|
typedef struct LedProgram {
|
|
char *name;
|
|
void (*prog)(uint8_t *, uint16_t);
|
|
} LedProgram;
|
|
|
|
|
|
|
|
extern const uint8_t edge_map[10];
|
|
extern const LedProgram edge_pgm[6];
|
|
|
|
extern color_hsv hsv_edge[RGB_EDGE_COUNT];
|
|
|
|
|
|
|
|
void rgbled_init();
|
|
|
|
void rgb_edge_update(uint8_t idx);
|
|
|
|
|
|
|
|
#endif /* USER_LED_RGBLED_H_ */
|
|
|