2023-04-02 23:14:19 -04:00
|
|
|
#pragma once
|
|
|
|
#include <zephyr/kernel.h>
|
2023-04-04 12:04:06 -04:00
|
|
|
#include "creole.h"
|
2023-04-02 23:14:19 -04:00
|
|
|
|
2023-04-04 12:04:06 -04:00
|
|
|
int dac_take(int dac, k_timeout_t timeout);
|
2023-04-02 23:14:19 -04:00
|
|
|
int dac_release(int dac);
|
|
|
|
int dac_read_write(int dac, creole_word send, k_timeout_t timeout,
|
|
|
|
creole_word *recv);
|
|
|
|
|
2023-04-04 12:04:06 -04:00
|
|
|
int adc_take(int adc, k_timeout_t timeout);
|
2023-04-02 23:14:19 -04:00
|
|
|
int adc_release(int adc);
|
2023-04-04 12:04:06 -04:00
|
|
|
int adc_read(int adc, k_timeout_t timeout, creole_word *wrd);
|
2023-04-02 23:14:19 -04:00
|
|
|
|
|
|
|
int cloop_take(k_timeout_t timeout);
|
2023-04-04 12:04:06 -04:00
|
|
|
int cloop_read(int code, uint32_t *high_reg, uint32_t *low_reg,
|
|
|
|
k_timeout_t timeout);
|
|
|
|
int cloop_write(int code, uint32_t high_val, uint32_t low_val,
|
|
|
|
k_timeout_t timeout);
|
2023-04-02 23:14:19 -04:00
|
|
|
int cloop_release(void);
|
|
|
|
|
|
|
|
int waveform_take(int waveform, k_timeout_t timeout);
|
|
|
|
int waveform_release(int waveform);
|
|
|
|
|
|
|
|
#define MAX_WL_SIZE 4096
|
|
|
|
int waveform_load(uint32_t buf[MAX_WL_SIZE], int slot, k_timeout_t timeout);
|
|
|
|
int waveform_arm(int slot, bool halt_on_finish, uint32_t wait, k_timeout_t timeout);
|
|
|
|
int waveform_disarm(int slot);
|
|
|
|
|
|
|
|
|
|
|
|
/* Zephyr OS does not automatically clean up mutex resources.
|
|
|
|
* This will release all held locks.
|
|
|
|
*/
|
|
|
|
void access_release_thread(void);
|
|
|
|
|
|
|
|
/* Called once on initializion. */
|
2023-04-04 12:04:06 -04:00
|
|
|
void access_init(void);
|