add callback for harware error event - intended for embedded systems and allows to reset the system

This commit is contained in:
matthias.ringwald 2011-06-08 16:13:30 +00:00
parent 26767c8e10
commit c68bdf905b
2 changed files with 7 additions and 0 deletions

View File

@ -65,4 +65,5 @@ typedef struct {
void (*register_for_power_notifications)(void (*cb)(POWER_NOTIFICATION_t event));
void (*hw_error)(void);
} bt_control_t;

View File

@ -492,6 +492,12 @@ static void event_handler(uint8_t *packet, int size){
}
break;
case HCI_EVENT_HARDWARE_ERROR:
if(hci_stack.control->hw_error){
(*hci_stack.control->hw_error)();
}
break;
default:
break;
}