Nuvo-2500 Series User’s Manual
Copyright © 2015 Neousys Technology Inc. All Right Reserved.
Page 127 of 154
5.6 Using PWM Function
Pulse-width modulation, also known as PWM, output is available on Nuvis-2520at. And it's
also available as an option on Nuvo-2500. Nuvo-2510VTC doesn't support this functionality.
The Pulse Width Modulator (PWM) API provides a set of functions for programming and
operating the PWM controller. Each generator block has two PWM output signals, which
can be operated independently or as a pair of signals with dead band delays inserted. The
control block determines the polarity of the PWM signals and which signals are passed
through to the pins.
5.6.1 PWM Function Reference
5.6.1.1 PWM_RegisterStatus
Syntax
BOOL PWM_RegisterStatus(void (__stdcall *pfnHandler)(DWORD
genBits, DWORD status));
Description
Registers a callback function, which is called when the PWM controller has a status
interrupt.
Parameter
pfnHandler
[in]
Specifies the callback function. The prototype for this function is descripted as
follow.
void (__stdcall *pfnHandler)(DWORD genBits, DWORD status);
Return Value
Returns TRUE if registration successes, FALSE if registration failed.
Usage
void __stdcall PWM_Status(DWORD genBits, DWORD status)
{
printf("%08x: %08x\n", genBits, status);