motor-control-sdk/source/.meta/position_sense/tamagawa/tamagawa.h.xdt
Naresh A 206f344bd1 am64x/am243x/am263x : remove motor_control folder from the repository
remove motor_control folder from the repository

Fixes: PINDSW-5635

Signed-off-by: Naresh A <nareshk@ti.com>
2023-07-13 15:23:20 +05:30

37 lines
1.2 KiB
Plaintext

%%{
let module = system.modules[args[0]];
%%}
/*
* Tamagawa
*/
/* Tamagawa Instance Macros */
#define CONFIG_TAMAGAWA_NUM_INSTANCES `module.$instances.length`
% for(let i = 0; i < module.$instances.length; i++) {
% let instance = module.$instances[i];
% let sliceVal = 1;
% let icssValue = 0;
% if(instance.instance === "ICSSG0")
% {
% if(instance.PRU_ICSSG0_PRU.$assign === "PRU_ICSSG0_PRU0")
% {
% sliceVal = 0;
% }
% }
% else if(instance.instance === "ICSSG1")
% {
% icssValue = 1;
% if(instance.PRU_ICSSG1_PRU.$assign === "PRU_ICSSG1_PRU0")
% {
% sliceVal = 0;
% }
% }
#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`_BAUDRATE (`instance.baudrate`)
#define `instance.$name`_BOOSTER_PACK (`instance.Booster_Pack & 1`)
#define PRUICSS_PRUx (`sliceVal`)
#define PRUICSSx (`icssValue`)
% }