#include <68332/types.h>
#include <68332/tpu.h>
Go to the source code of this file.
Data Structures | |
struct | _MCPWMObject |
Typedefs | |
typedef _MCPWMObject | MCPWMObject |
typedef _MCPWMObject * | MCPWMObjectP |
Functions | |
MCPWMObjectP | mcpwm_init (uint16 tpu_num, uint16 chan, uint16 priority, uint16 period, uint16 irqr) |
int | mcpwm_start (MCPWMObjectP handle) |
void | mcpwm_shutdown (MCPWMObjectP handle) |
int | mcpwm_add_ea (MCPWMObjectP handle, uint16 chan, uint16 high) |
int | mcpwm_set_ea_hightime (MCPWMObjectP handle, uint16 chan, uint16 high) |
To use the functions defined in this file, include <68332/mcpwm.h> and link libtpu.a.
|
Alias for the structure struct _MCPWMObject, which represents a MCPWM object. |
|
Alias for a pointer to struct _MCPWMObject |
|
Create and initialize a new MCPWM Object This function creates and initializes a new MCPWM TPU function. This function only initializes the master channel, use the mcpwm_add... functions to initialize any slave channels you wish to add.
|
|
Start an MCPWM function. This function is used to start all the MCPWM channels after they have been added with the various mcpwm_add... functions. This is used to ensure all the channels start up at the same time.
|
|
Shutdown a MCPWM function. This function shuts down a MCPWM system. You need to free the the MCPWMObject yourself after this function returns.
|
|
Add an edge-aligned TPU slave channel. This function allows you to create an edge-aligned TPU channel associated with the master channel created with the function mcpwm_init().
|
|
Set the high time (pulse width) for an edge-aligned channel. This function allows you to set the high time on an edge aligned channel.
|