#include "bma253.h"


int bma253_get_chip_id(void){
    uint8_t data = 0, res = 0;
    data = HAL_I2C_Mem_Read(&hi2c1, REG_ADDR_BGW_CHIPID, REG_VALUE_CHIP_ID, 1, &res, 1, 10);
    switch(data){
        case HAL_OK:
        printf("HAL_OK : %d \r\n",data);
        break;
        case HAL_ERROR:
        printf("HAL_ERROR : %d\r\n",data);
        break;
        case HAL_BUSY:
        printf("HAL_BUSY : %d\r\n",data);
        break;
        case HAL_TIMEOUT:
        printf("HAL_TIMEOUT : %d\r\n",data);
        break;
    }
}
