initial commit

This commit is contained in:
2025-12-01 19:51:51 +09:00
commit 9c2fdbf8ed
23 changed files with 1757 additions and 0 deletions

22
ccs/state.h Normal file
View File

@@ -0,0 +1,22 @@
#pragma once
#include <stdint.h>
#define STATE_SENSOR_BUFFER_SIZE 8
typedef struct {
uint8_t buffer[STATE_SENSOR_BUFFER_SIZE];
int front;
int rear;
int size;
} SensorBuffer;
void senbuf_init(SensorBuffer *sb);
int senbuf_is_full(SensorBuffer *sb);
int senbuf_push(SensorBuffer *sb, uint8_t value);
int senbuf_pop(SensorBuffer *sb);
void senbuf_get(SensorBuffer *sb, uint8_t *out, int lookahead);