Files
TI_C2000_F28377S_FreeRTOS/C2000Ware/driverlib/.meta/ecap/ecap.board.h.xdt
T
2026-08-30 23:04:35 -07:00

22 lines
949 B
Plaintext

% var moduleName = "ecap"
% var module = system.modules['/driverlib/' + moduleName + '.js'];
%if (module != null)
%{
//*****************************************************************************
//
// ECAP Configurations
//
//*****************************************************************************
% for(var i = 0; i < module.$instances.length; i++) {
% var instance = module.$instances[i];
% let modInst = instance[moduleName];
#define `instance.$name`_BASE `instance.ecapBase`
% // next get the digit of the absolute ecapBase name (like "ECAP7_BASE"), to use as the "HRCAP#_BASE" value
% if (instance.hrcapEnable == true) {
% var baseNumber = instance.ecapBase.match(/\d+/)[0]
#define `instance.$name`_HR_BASE HRCAP`baseNumber`_BASE
% }
#define `instance.$name`_SIGNAL_MUNIT_BASE `instance.ecapBase.replace("_BASE", "SIGNALMONITORING_BASE")`
void `instance.$name`_init();
% }
%}