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(2),
|
||||||
BLE_CHAR_PUMP_ENABLED(3),
|
BLE_CHAR_PUMP_ENABLED(3),
|
||||||
BLE_CHAR_PUMP_ENABLED(4),
|
BLE_CHAR_PUMP_ENABLED(4),
|
||||||
{
|
{ 0 }
|
||||||
0, // No more characteristics in this service.
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
.type = BLE_GATT_SVC_TYPE_PRIMARY,
|
.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(2),
|
||||||
BLE_CHAR_PUMP_STATE(3),
|
BLE_CHAR_PUMP_STATE(3),
|
||||||
BLE_CHAR_PUMP_STATE(4),
|
BLE_CHAR_PUMP_STATE(4),
|
||||||
{
|
{ 0 }
|
||||||
0, // No more characteristics in this service.
|
},
|
||||||
}
|
|
||||||
}
|
|
||||||
}, {
|
}, {
|
||||||
.type = BLE_GATT_SVC_TYPE_PRIMARY,
|
.type = BLE_GATT_SVC_TYPE_PRIMARY,
|
||||||
.uuid = BLE_UUID16_DECLARE(BLE_SERVICE_PUMP_DURATION),
|
.uuid = BLE_UUID16_DECLARE(BLE_SERVICE_PUMP_DURATION),
|
||||||
|
|
||||||
.characteristics = (struct ble_gatt_chr_def[]) {
|
.characteristics = (struct ble_gatt_chr_def[]) {
|
||||||
BLE_CHAR_PUMP_DURATION(1),
|
BLE_CHAR_PUMP_DURATION(1),
|
||||||
BLE_CHAR_PUMP_DURATION(2),
|
BLE_CHAR_PUMP_DURATION(2),
|
||||||
BLE_CHAR_PUMP_DURATION(3),
|
BLE_CHAR_PUMP_DURATION(3),
|
||||||
BLE_CHAR_PUMP_DURATION(4),
|
BLE_CHAR_PUMP_DURATION(4),
|
||||||
{
|
{ 0 }
|
||||||
0, // No more characteristics in this service.
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
.type = BLE_GATT_SVC_TYPE_PRIMARY,
|
.type = BLE_GATT_SVC_TYPE_PRIMARY,
|
||||||
.uuid = BLE_UUID16_DECLARE(BLE_SERVICE_BARBACK),
|
.uuid = BLE_UUID16_DECLARE(BLE_SERVICE_BARBACK),
|
||||||
|
|
||||||
.characteristics = (struct ble_gatt_chr_def[]) {
|
.characteristics = (struct ble_gatt_chr_def[]) {
|
||||||
{
|
{
|
||||||
.uuid = BLE_UUID16_DECLARE(CHAR_POUR),
|
.uuid = BLE_UUID16_DECLARE(CHAR_POUR),
|
||||||
.access_cb = svc_access_system,
|
.access_cb = svc_access_system,
|
||||||
.val_handle = &ble_svc_handle,
|
.val_handle = &ble_svc_handle,
|
||||||
.flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ
|
.flags = BLE_GATT_CHR_F_WRITE | BLE_GATT_CHR_F_READ
|
||||||
}, {
|
}, {
|
||||||
.uuid = BLE_UUID16_DECLARE(CHAR_BUTTON),
|
.uuid = BLE_UUID16_DECLARE(CHAR_BUTTON),
|
||||||
.access_cb = svc_access_system,
|
.access_cb = svc_access_system,
|
||||||
.val_handle = &svc_handle_button,
|
.val_handle = &svc_handle_button,
|
||||||
.flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_NOTIFY
|
.flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_NOTIFY
|
||||||
},
|
},
|
||||||
{ 0 }
|
{ 0 }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ 0 } // no more services
|
{ 0 } // no more services
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue