But in button event handler.
i want data to read from eeprom through i2c bus. and send it
through bluetooth stack for every press of buuton 0.
but in master control panel ,its says bluetooth connection loss ,once i press button 0.
Kindly tell me is it not possible to access i2c in button even handler.
static void button_event_handler(uint8_t pin_no) { switch (pin_no) { case HR_INC_BUTTON_PIN_NO:
//m_cur_heart_rate += HEART_RATE_CHANGE; m_cur_heart_rate = data2; dataW1[0]=dataW1[0]+2; twi_master_transfer(addw, dataW1, 2, 1); twi_master_transfer(addr, data1, 2, 0); data2=(data1[0]<<4)|(data1[1]); break;
case HR_DEC_BUTTON_PIN_NO:
//m_cur_heart_rate -= HEART_RATE_CHANGE; //if (m_cur_heart_rate < MIN_HEART_RATE) // { // m_cur_heart_rate = MAX_HEART_RATE; // Loop back // } break;
default: APP_ERROR_HANDLER(pin_no); } }