最近用了一款 BS8112A-3 16NSOP 12键电容触摸按键芯片IC,调了半天没调通 ,最后发现把设备地址看错了,手册给的是7bit地址,子设备地址应该是0xA0不应该是0x50!
#include "stm32f0xx.h"
void I2C_INT_Init()
{
GPIO_InitTypeDef GPIO_InitStructure;
EXTI_InitTypeDef EXTI_InitStructure;
NVIC_InitTypeDef NVIC_InitStructure;
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA,ENABLE);//ÅäÖÃʱÖÓ
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG,ENABLE);//ÅäÖÃʱÖÓ
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_S