motor-control-sdk/source/.meta/position_sense/templates/hdsl_templates.h.xdt
Dhaval Khandla 086fda69e2 am64x/am243x: hdsl: Add support for third channel
- Add example and firmware projects for third channel
- Update diagnostic application changes to support 3rd channel
- Add overlay based firmware build for third channel
- Update sysconfig module for third channel
- Add driver APIs for configuring copy table and channel mask
- Add IPC among cores when overlay based loading is needed for
  third channel
- Add logic to reset all channels when one channel is reset

Fixes: PINDSW-7051

Signed-off-by: Rajul Bhambay <r-bhambay@ti.com>
Signed-off-by: Dhaval Khandla <dhavaljk@ti.com>
2023-12-30 14:32:25 +05:30

29 lines
782 B
Plaintext

%%{
let module = system.modules[args[0]];
%%}
/*
* HDSL
*/
/* HDSL Instance Macros */
#define CONFIG_HDSL_NUM_INSTANCES `module.$instances.length`
% for(let i = 0; i < module.$instances.length; i++) {
% let instance = module.$instances[i];
% let Mode = 0;
%if(instance.Mode === "FREE_RUN")
%{
% Mode = 0;
%}
%else
%{
% Mode = 1;
%}
#define `instance.$name`_BOOSTER_PACK `instance.Booster_Pack & 1`
#define `instance.$name` (`i`)
#define `instance.$name`_CHANNEL0 (`instance.channel_0 & 1`)
#define `instance.$name`_CHANNEL1 (`instance.channel_1 & 1`)
#define `instance.$name`_CHANNEL2 (`instance.channel_2 & 1`)
#define `instance.$name`_MODE (`Mode`)
% }