41#define PRU_BINARY_FILE "/lib/firmware/rocketlogger.bin"
44#define PRU_DIGITAL_SIZE 4
46#define PRU_SAMPLE_SIZE 4
48#define PRU_BUFFER_STATUS_SIZE 4
53#define PRU_DIGITAL_INPUT_MASK 0x3F
54#define PRU_DIGITAL_INPUT1_MASK 0x01
55#define PRU_DIGITAL_INPUT2_MASK 0x02
56#define PRU_DIGITAL_INPUT3_MASK 0x04
57#define PRU_DIGITAL_INPUT4_MASK 0x08
58#define PRU_DIGITAL_INPUT5_MASK 0x10
59#define PRU_DIGITAL_INPUT6_MASK 0x20
60#define PRU_DIGITAL_I1L_VALID_MASK 0x40
61#define PRU_DIGITAL_I2L_VALID_MASK 0x80
64#define PRU_TIMEOUT_US 2000000
165 rl_config_t const *
const config, uint32_t aggregates);
186int pru_sample(FILE *data_file, FILE *ambient_file,
@ PRU_STATE_SAMPLE_FINITE
PRU off.
@ PRU_STATE_SAMPLE_CONTINUOUS
PRU sampling in finite mode.
int pru_sample(FILE *data_file, FILE *ambient_file, rl_config_t const *const config)
int pru_control_init(pru_control_t *const pru_control, rl_config_t const *const config, uint32_t aggregates)
int pru_set_state(pru_state_t state)
enum pru_state pru_state_t
#define RL_CHANNEL_COUNT
Number of RocketLogger analog channels.
uint32_t index
buffer index
pru_data_t const data[]
the data blocks
uint32_t sample_rate
Sample rate of the ADC (in kSPS)
uint32_t sample_limit
Samples to take (0 for continuous)
uint32_t buffer0_addr
Memory address of the shared buffer 0.
uint32_t buffer1_addr
Memory address of the shared buffer 1.
pru_state_t state
Current PRU state.
uint32_t buffer_length
Shared buffer length in number of data elements.
int32_t channel_analog[RL_CHANNEL_COUNT]