Batch 21 (20261027-A-bos-redo-21) rebuilt 40 of the 53 rejected Bos-qiao environments: hidden assertions that ran inside the candidate's process now run in a trusted parent that reads observations from a low-UID worker; gold bytes are unchanged. 9 were excluded for scope (ROS2, oversize, security core), 3 are blocked because the source requires an exec bit the platform does not freeze, 1 lacks requests/bs4 in trace6. Batch 18 (20261026-C-hwe-codegen-18) adds its last 34 of 134 tasks; the first 100 landed in 2f32624d. Claude reviewed 74/74 USABLE against current digests, canonical families, no ID or source overlap with main, plain public docs. Only the new task directories are taken; the stale pre-batch-20 copies of concur-release-capsule and resource-temp-link on the batch 21 branch and both branches' progress notes stay as main has them. Difficulty is unmeasured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
61 lines
1.1 KiB
C
61 lines
1.1 KiB
C
#ifndef ADC_H
|
|
#define ADC_H
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
|
|
enum AdcCode {
|
|
ADC_OK = 0,
|
|
ADC_RANGE = 1,
|
|
ADC_BUSY = 2,
|
|
ADC_IDLE = 3,
|
|
ADC_EMPTY = 4
|
|
};
|
|
|
|
typedef struct {
|
|
int b0;
|
|
int b1;
|
|
int b2;
|
|
} AdcFrame;
|
|
|
|
typedef struct {
|
|
int count;
|
|
int sum;
|
|
int minimum;
|
|
int maximum;
|
|
int last;
|
|
int microvolts;
|
|
} AdcReading;
|
|
|
|
typedef struct {
|
|
int vref;
|
|
int mask;
|
|
int rounds;
|
|
int active;
|
|
int next_channel;
|
|
int completed_rounds;
|
|
int frames;
|
|
} AdcStatus;
|
|
|
|
typedef struct {
|
|
int vref;
|
|
int mask;
|
|
int rounds;
|
|
int active;
|
|
int used;
|
|
int samples[256];
|
|
} Adc;
|
|
|
|
void adc_reset(Adc *adc);
|
|
int adc_encode(int channel, AdcFrame *out);
|
|
int adc_decode(int b0, int b1, int b2, int *out);
|
|
int adc_config(Adc *adc, int vref, int mask, int rounds);
|
|
int adc_start(Adc *adc);
|
|
int adc_tx(const Adc *adc, AdcFrame *out);
|
|
int adc_feed(Adc *adc, int b0, int b1, int b2);
|
|
int adc_abort(Adc *adc);
|
|
int adc_read(const Adc *adc, int channel, AdcReading *out);
|
|
void adc_status(const Adc *adc, AdcStatus *out);
|
|
int adc_clear(Adc *adc);
|
|
int adc_run_cli(FILE *input, FILE *output, Adc *result);
|
|
#endif
|