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/pedometer.h
#ifndef STRIDE_PEDOMETER_H
#define STRIDE_PEDOMETER_H
#include "board.h"
#include "vendor/bma400.h"
typedef struct { uint32_t previous_raw; uint64_t total; bool baseline_valid; } StepAccumulator;
bool steps_update(StepAccumulator *s,uint32_t raw,uint32_t max_plausible_delta);
bool pmic_init(void);
bool display_power(bool on);
bool oled_frame(const uint8_t framebuffer[512]);
bool oled_steps(uint64_t total);
bool sensor_init(struct bma400_dev *sensor,bool wrist);
bool sensor_read(struct bma400_dev *sensor,uint32_t *steps);
bool gauge_configure_100mah(void); /* Unsealed, standard 4.2 V cell only. */
bool gauge_read(uint16_t *millivolts,uint16_t *soc_percent);
/* Immutable custom GATT snapshot: v1, flags, u64 steps, u16 mV, u8 SOC, reserved. */
void encode_snapshot(uint8_t out[14],uint64_t total,uint16_t mv,uint8_t soc,uint8_t flags);
#endif