add mp3 player code

This commit is contained in:
cuu
2025-03-16 23:34:49 +08:00
parent 95a528d5b7
commit 4c8b136686
19 changed files with 1782 additions and 0 deletions

29
Code/MP3Player/i2ckbd.h Normal file
View File

@@ -0,0 +1,29 @@
#ifndef _I2C_KBD_H
#define _I2C_KBD_H
#include "task.h"
#include "gpio_rp2040.h"
#include "i2c_rp2040.h"
#define I2C_KBD_MOD 1
#define I2C_KBD_SDA 6
#define I2C_KBD_SCL 7
#define I2C_KBD_SPEED 400000
#define I2C_KBD_ADDR 0x1F
class i2c_kbd {
public:
i2c_kbd();
int write_i2c_kbd();
int read_i2c_kbd();
int I2C_Send_RegData(int i2caddr, int reg, char command);
virtual ~i2c_kbd();
private:
i2c_rp2040 _master;
int c;
int _stat;
};
#endif