imrishabh18/pedometer
This code defines and assembles a simple radio receiver hardware circuit using specific imported capacitors, inductors, RF connectors, and oscillator components with precise footprints and schematic attributes.
- Version
- 1.1.3
- License
- unset
- Stars
- 0
firmware/app.h
#ifndef STRIDE_APP_H
#define STRIDE_APP_H
#include "pedometer.h"
typedef struct {
struct bma400_dev sensor;
StepAccumulator steps;
uint64_t next_sample, display_until, last_checkpoint, last_sample;
uint16_t millivolts, soc;
uint8_t flags;
bool display_on, gauge_configured;
} StrideApp;
/* All calls run on one application task, never in GPIO/BLE interrupt callbacks. */
bool stride_init(StrideApp *app,uint64_t restored_total,bool wrist);
void stride_tick(StrideApp *app,bool button_pressed);
uint64_t stride_deadline(const StrideApp *app);
/* Implement using the SDK GATT server and two-slot CRC-protected NVS journal.
* publish must copy its 14-byte argument before returning. */
void app_ble_publish(const uint8_t snapshot[14]);
bool app_checkpoint(uint64_t total);
#endif