Skip to content

File syn_dac.h

File List > drivers > syn_dac.h

Go to the documentation of this file

#ifndef SYN_DAC_H
#define SYN_DAC_H

#include "../common/syn_defs.h"
#include "../port/syn_port_dac.h"

#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
    uint8_t channel; 
} SYN_DAC;

SYN_Status syn_dac_init(SYN_DAC *dac, uint8_t channel);

SYN_Status syn_dac_write_raw(const SYN_DAC *dac, uint16_t raw);

SYN_Status syn_dac_write_mv(const SYN_DAC *dac, uint16_t mv);

SYN_Status syn_dac_write_percent(const SYN_DAC *dac, uint8_t percent);

uint16_t syn_dac_max_raw(const SYN_DAC *dac);

#ifdef __cplusplus
}
#endif

#endif /* SYN_DAC_H */