Lines Matching +full:bit +full:- +full:per +full:- +full:seconds

1 /* main.c - Bluetooth Cycling Speed and Cadence app main entry point */
6 * SPDX-License-Identifier: Apache-2.0
71 #define CSC_FEAT_WHEEL_REV BIT(0)
72 #define CSC_FEAT_CRANK_REV BIT(1)
73 #define CSC_FEAT_MULTI_SENSORS BIT(2)
76 #define CSC_WHEEL_REV_DATA_PRESENT BIT(0)
77 #define CSC_CRANK_REV_DATA_PRESENT BIT(1)
103 uint8_t *value = attr->user_data; in read_location()
147 switch (req->op) { in write_ctrl_point()
149 if (len != sizeof(req->op) + sizeof(req->cwr)) { in write_ctrl_point()
154 c_wheel_revs = sys_le32_to_cpu(req->cwr); in write_ctrl_point()
158 if (len != sizeof(req->op) + sizeof(req->location)) { in write_ctrl_point()
164 if (req->location == sensor_location) { in write_ctrl_point()
169 /* Pre-set status */ in write_ctrl_point()
174 if (supported_locations[i] == req->location) { in write_ctrl_point()
175 sensor_location = req->location; in write_ctrl_point()
183 if (len != sizeof(req->op)) { in write_ctrl_point()
189 ctrl_point_ind(conn, req->op, SC_CP_RSP_SUCCESS, in write_ctrl_point()
198 ctrl_point_ind(conn, req->op, status, NULL, 0); in write_ctrl_point()
236 ind->op = SC_CP_OP_RESPONSE; in ctrl_point_ind()
237 ind->req_op = req_op; in ctrl_point_ind()
238 ind->status = status; in ctrl_point_ind()
242 memcpy(ind->data, data, data_len); in ctrl_point_ind()
273 nfy->flags = 0U; in measurement_nfy()
279 nfy->flags |= CSC_WHEEL_REV_DATA_PRESENT; in measurement_nfy()
283 memcpy(nfy->data, &data, sizeof(data)); in measurement_nfy()
291 nfy->flags |= CSC_CRANK_REV_DATA_PRESENT; in measurement_nfy()
295 memcpy(nfy->data + len, &data, sizeof(data)); in measurement_nfy()
326 * notified approximately once per second. This interval may vary in csc_simulation()
335 * every 64 seconds. in csc_simulation()
373 BT_DATA(BT_DATA_NAME_COMPLETE, CONFIG_BT_DEVICE_NAME, sizeof(CONFIG_BT_DEVICE_NAME) - 1),
395 battery_level--; in bas_notify()