 |
MAX32665 Peripheral Driver API
Peripheral Driver API for the MAX32665
|
48 #include "mxc_device.h"
49 #include "mxc_errors.h"
50 #include "mxc_assert.h"
void MXC_PT_Init(mxc_ptg_regs_t *ptg, mxc_clk_scale_t clk_scale)
This function initializes the pulse trains to a known stopped state and sets the global PT clock scal...
void MXC_PT_Resync(mxc_ptg_regs_t *ptg, uint32_t pts)
Resynchronize individual pulse trains together. Resync will stop those resync_pts; others will be sti...
Structure type for pulse train mode configuration.
Definition: pt.h:70
uint32_t MXC_PT_GetFlags(mxc_ptg_regs_t *ptg)
Gets the pulse trains's interrupt flags.
uint8_t ptLength
Number of bits in pulse train, 0 = 32bits, 1 = non valid , 2 = 2 bits, ...
Definition: pt.h:74
void MXC_PT_Stop(mxc_ptg_regs_t *ptg, unsigned pts)
Stops pulse trains.
Definition: ptg_regs.h:88
int MXC_PT_Config(mxc_ptg_regs_t *ptg, mxc_pt_cfg_t *cfg)
Configures the pulse train in the specified mode.
uint32_t pattern
Output pattern to shift out, starts at LSB.
Definition: pt.h:73
int MXC_PT_SqrWaveConfig(mxc_ptg_regs_t *ptg, unsigned channel, uint32_t freq)
Configures the pulse train in the square wave mode.
void MXC_PT_SetPattern(unsigned pts, uint32_t pattern)
Sets the pattern of the pulse train.
void MXC_PT_EnableInt(mxc_ptg_regs_t *ptg, uint32_t pts)
Enable interrupts for the pulse trains selected.
void MXC_PT_ClearFlags(mxc_ptg_regs_t *ptg, uint32_t flags)
Clears the pulse train's interrupt flag.
mxc_clk_scale_t
Enumeration type for the system clock scale types.
Definition: pt.h:82
uint32_t MXC_PT_IsActive(mxc_ptg_regs_t *ptg, uint32_t pts)
Determines if the pulse trains selected are running.
void MXC_PT_DisableRestart(unsigned channel, uint8_t restartIndex)
Disable the restart for the specified pulse train.
unsigned channel
PT Channel to use.
Definition: pt.h:71
void MXC_PT_Shutdown(mxc_ptg_regs_t *ptg, uint32_t pts)
Shutdown the pulse train channel/channels.
void MXC_PT_DisableInt(mxc_ptg_regs_t *ptg, uint32_t pts)
Disable interrupts for the pulse trains selected.
void MXC_PT_EnableRestart(unsigned start, unsigned stop, uint8_t restartIndex)
Setup and enables a pulse train to restart after another pulse train has exited its loop....
void MXC_PT_Start(mxc_ptg_regs_t *ptg, unsigned pts)
Starts the pulse trains specified.
uint16_t loopDelay
Delay between loops specified in bits Example: loopDelay = 4, delays time = time it takes to shift ou...
Definition: pt.h:76
uint16_t loop
Number of times to repeat the train, 0 = continuous.
Definition: pt.h:75
uint32_t bps
pulse train bit rate
Definition: pt.h:72