View Code? Open in Web Editor
NEW
The driver for the microprocessor
License: GNU Affero General Public License v3.0
C 45.66%
Batchfile 0.08%
C++ 34.35%
HTML 2.22%
Assembly 17.69%
drivers-for-mcu's Introduction
STM32F1
Keil、IAR
3.1 接口总线
总线 |
类型 |
备注 |
I2C |
模拟I2C |
7bit地址 |
SPI |
硬件SPI/模拟SPI |
支持4种类型/非标SPI |
Onewire |
模拟单总线 |
IO模拟 |
3.2 外设驱动
外设 |
型号 |
原厂 |
接口 |
备注 |
温度传感器 |
LM75A |
NXP |
I2C |
|
LED恒流驱动 |
LP55231 |
TI |
I2C |
|
EEPROM/FRAM |
AT24Cxx |
ATMEL |
I2C |
|
EEPROM |
ST25AAXX |
ST |
SPI |
|
ADC |
AD7684 |
ADI |
SPI |
3线SPI |
步进电机驱动 |
TMC2660 |
TRINAMIC |
SPI |
|
温度传感器 |
DS18B20 |
MAXIM |
Onewire |
|
DAC |
AD5290 |
ADI |
SPI |
3线SPI |
三轴加速度传感器 |
LIS3DH |
ST |
I2C |
|
热电阻/热电偶驱动芯片 |
AD7793 |
ADI |
SPI |
|
不定期更新!
drivers-for-mcu's People
Contributors
drivers-for-mcu's Issues
/* 读写指令 /
#define READ_EN 0x40 / 读使能 /
#define CONTINUE_READ 0x20 / 连续读 */
参见AD7793数据手册连续读使能位应该为CR2,也就是第三位,因此应该修正为0x02。
char ee_24clxx_writebytes(uint16_t write_addr, char* pwrite_buff, uint16_t writebytes)
函数内write_len,page_offset两个变量应该同writebytes一样为uint16而不是uint8
int8_t ee_24clxx_init(struct i2c_dev_device *i2c_bus)
{
if (NULL == i2c_bus)
{
return -1;
}
ee_i2c_dev = i2c_bus;
}
你可以打印试试:printf("%d \r\n",sizeof(-1));