I have a custom board with a nRF52840 and a nRF21540. To control my FEM (nRF21540) I have added the following to my code to my nRF52840_nRF52840.dts file:
/ {
nrf_radio_fem: name_of_fem_node {
compatible = "nordic,nrf21540-fem";
tx-en-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
rx-en-gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>;
pdn-gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
ant-sel-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
mode-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
};
};
Now, in the 'main.c' file, I want to add the code to control these pins/signals. I'm sorry this is probably so simple, but I am new to this type of configuration, and I don't what I should do next. I don't know what to do to control the various FEM lines within the 'main.c' program. Any help would greatly be appreciated.
Thanks,
Sheldon