Go to the documentation of this file.
38 #include "drv_digital_out.h"
39 #include "drv_digital_in.h"
40 #include "drv_spi_master.h"
54 #define WAVEFORM_MAP_MIKROBUS( cfg, mikrobus ) \
55 cfg.miso = MIKROBUS( mikrobus, MIKROBUS_MISO ); \
56 cfg.mosi = MIKROBUS( mikrobus, MIKROBUS_MOSI ); \
57 cfg.sck = MIKROBUS( mikrobus, MIKROBUS_SCK ); \
58 cfg.cs = MIKROBUS( mikrobus, MIKROBUS_CS ); \
59 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
60 cfg.pwm = MIKROBUS( mikrobus, MIKROBUS_PWM )
67 #define WAVEFORM_RETVAL uint8_t
69 #define WAVEFORM_OK 0x00
70 #define WAVEFORM_INIT_ERROR 0xFF
77 #define WAVEFORM_CR_B28_BITMASK 1<<13
78 #define WAVEFORM_CR_HLB_BITMASK 1<<12
79 #define WAVEFORM_CR_FSELECT_BITMASK 1<<11
80 #define WAVEFORM_CR_PSELECT_BITMASK 1<<10
81 #define WAVEFORM_CR_RESET_BITMASK 1<<8
82 #define WAVEFORM_CR_SLEEP1_BITMASK 1<<7
83 #define WAVEFORM_CR_SLEEP12_BITMASK 1<<6
84 #define WAVEFORM_CR_OPBITEN_BITMASK 1<<5
85 #define WAVEFORM_CR_DIV2_BITMASK 1<<3
86 #define WAVEFORM_CR_MODE_BITMASK 1<<1
93 #define WAVEFORM_SINE_OUT 0x01
94 #define WAVEFORM_TRIANGLE_OUT 0x02
95 #define WAVEFORM_SQUARE_OUT 0x03
244 #endif // _WAVEFORM_H_
void waveform_digipot_dec(waveform_t *ctx)
Decrement function.
#define WAVEFORM_RETVAL
Definition: waveform.h:67
void waveform_triangle_output(waveform_t *ctx, uint32_t f)
Triangle output function.
void waveform_digipot_inc(waveform_t *ctx)
Increment function.
void waveform_cfg_setup(waveform_cfg_t *cfg)
Config Object Initialization function.
void waveform_sine_output(waveform_t *ctx, uint32_t f)
Sinusoide output function.
void waveform_square_output(waveform_t *ctx, uint32_t f)
Square output function.
void waveform_write_freqency(waveform_t *ctx, uint32_t f)
Freqency function.
WAVEFORM_RETVAL waveform_init(waveform_t *ctx, waveform_cfg_t *cfg)
Initialization function.
void waveform_write_reg(waveform_t *ctx, uint16_t reg_setting)
Registry finction.