Exemplo n.º 1
0
static void
batt_lvl_notif_timer_cb(struct rtc_ctx *ctx)
{
        void *val = &batt_serv_ctx.last_reading;
	uint16_t len = sizeof(batt_serv_ctx.last_reading);
	batt_lvl_read_cb(&batt_serv_ctx, &batt_serv_ctx.batt_lvl, &val, &len);
	simble_srv_char_notify(&batt_serv_ctx.batt_lvl, false, len, val);
}
static void
notif_timer_cb(struct rtc_ctx *ctx)
{
        void *val = &motion_ctx.motion_value;
	uint16_t len = sizeof(motion_ctx.motion_value);
        motion_read(&motion_ctx, &motion_ctx.motion, &val, &len);
        simble_srv_char_notify(&motion_ctx.motion, false, len,
                &motion_ctx.motion_value);
}