just layout cleanup
This commit is contained in:
parent
64fa0db702
commit
20871b9059
1 changed files with 18 additions and 26 deletions
44
main/ble.c
44
main/ble.c
|
@ -78,9 +78,7 @@ static const struct ble_gatt_svc_def service_defs[] = {
|
|||
BLE_CHAR_PUMP_ENABLED(2),
|
||||
BLE_CHAR_PUMP_ENABLED(3),
|
||||
BLE_CHAR_PUMP_ENABLED(4),
|
||||
{
|
||||
0, // No more characteristics in this service.
|
||||
}
|
||||
{ 0 }
|
||||
},
|
||||
}, {
|
||||
.type = BLE_GATT_SVC_TYPE_PRIMARY,
|
||||
|
@ -90,42 +88,36 @@ static const struct ble_gatt_svc_def service_defs[] = {
|
|||
BLE_CHAR_PUMP_STATE(2),
|
||||
BLE_CHAR_PUMP_STATE(3),
|
||||
BLE_CHAR_PUMP_STATE(4),
|
||||
{
|
||||
0, // No more characteristics in this service.
|
||||
}
|
||||
}
|
||||
{ 0 }
|
||||
},
|
||||
}, {
|
||||
.type = BLE_GATT_SVC_TYPE_PRIMARY,
|
||||
.uuid = BLE_UUID16_DECLARE(BLE_SERVICE_PUMP_DURATION),
|
||||
|
||||
.characteristics = (struct ble_gatt_chr_def[]) {
|
||||
BLE_CHAR_PUMP_DURATION(1),
|
||||
BLE_CHAR_PUMP_DURATION(2),
|
||||
BLE_CHAR_PUMP_DURATION(3),
|
||||
BLE_CHAR_PUMP_DURATION(4),
|
||||
{
|
||||
0, // No more characteristics in this service.
|
||||
}
|
||||
{ 0 }
|
||||
},
|
||||
}, {
|
||||
.type = BLE_GATT_SVC_TYPE_PRIMARY,
|
||||
.uuid = BLE_UUID16_DECLARE(BLE_SERVICE_BARBACK),
|
||||
|
||||
.characteristics = (struct ble_gatt_chr_def[]) {
|
||||
{
|
||||
.uuid = BLE_UUID16_DECLARE(CHAR_POUR),
|
||||
.access_cb = svc_access_system,
|
||||
.val_handle = &ble_svc_handle,
|
||||
.flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ
|
||||
}, {
|
||||
.uuid = BLE_UUID16_DECLARE(CHAR_BUTTON),
|
||||
.access_cb = svc_access_system,
|
||||
.val_handle = &svc_handle_button,
|
||||
.flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_NOTIFY
|
||||
},
|
||||
{ 0 }
|
||||
}
|
||||
},
|
||||
{
|
||||
.uuid = BLE_UUID16_DECLARE(CHAR_POUR),
|
||||
.access_cb = svc_access_system,
|
||||
.val_handle = &ble_svc_handle,
|
||||
.flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ
|
||||
}, {
|
||||
.uuid = BLE_UUID16_DECLARE(CHAR_BUTTON),
|
||||
.access_cb = svc_access_system,
|
||||
.val_handle = &svc_handle_button,
|
||||
.flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_NOTIFY
|
||||
},
|
||||
{ 0 }
|
||||
}
|
||||
},
|
||||
{ 0 } // no more services
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue