- Add support for single channel - Add support for multi channel using single PRU - Add support for multi channel using multiple PRUs with load share mode Fixes: PINDSW-5468, PINDSW-5479, PINDSW-5488, PINDSW-5494, PINDSW-5495 Signed-off-by: Dhaval Khandla <dhavaljk@ti.com>
50 lines
1.6 KiB
Plaintext
50 lines
1.6 KiB
Plaintext
%%{
|
|
let module = system.modules[args[0]];
|
|
%%}
|
|
/*
|
|
* BiSSC
|
|
*/
|
|
|
|
/* BiSSC Instance Macros */
|
|
#define CONFIG_BISSC_NUM_INSTANCES `module.$instances.length`
|
|
% for(let i = 0; i < module.$instances.length; i++) {
|
|
% let instance = module.$instances[i];
|
|
% let Mode = 0;
|
|
% 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;
|
|
% }
|
|
% }
|
|
%if(((instance.channel_0 & 1)&&(instance.channel_1 & 1))||((instance.channel_1 & 1)&&(instance.channel_2 & 1))||((instance.channel_2 & 1)&&(instance.channel_0 & 1)))
|
|
%{
|
|
% Mode = 1;
|
|
%}
|
|
%if(instance.Multi_Channel_Load_Share & 1)
|
|
%{
|
|
% Mode = 2;
|
|
%}
|
|
|
|
#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`_LOAD_SHARE_MODE `instance.Multi_Channel_Load_Share & 1`
|
|
#define `instance.$name`_MODE `Mode`
|
|
#define `instance.$name`_BOOSTER_PACK (`instance.Booster_Pack & 1`)
|
|
#define PRUICSS_PRUx (`sliceVal`)
|
|
#define PRUICSSx (`icssValue`)
|
|
% }
|