USB840F/M/X BLE 5, Thread, Zigbee Dongles
Ver 1.00 May 2019
int main(void)
{
....
#ifdef APP_PA_LAN
nrf_gpio_cfg_output(APP_CPS_PIN);
nrf_gpio_cfg_output(APP_CHL_PIN);
nrf_gpio_pin_set(APP_CHL_PIN);
nrf_gpio_pin_clear(APP_CPS_PIN); //enable
pa_lna_init(APP_PA_PIN,APP_LNA_PIN);
#endif
....
}
SKY66112 control codes.
#include <stdint.h>
#include <string.h>
#include "pa_lna.h"
#include "ble.h"
#include "app_error.h"
#include "nrf_drv_gpiote.h"
#include "nrf_drv_ppi.h"
void pa_lna_init(uint32_t gpio_pa_pin, uint32_t gpio_lna_pin)
{
ble_opt_t opt;
uint32_t gpiote_ch = NULL;
ret_code_t err_code;
memset(&opt, 0, sizeof(ble_opt_t));
err_code = nrf_drv_gpiote_init();
if(err_code != NRF_ERROR_INVALID_STATE)
APP_ERROR_CHECK(err_code);
err_code = nrf_drv_ppi_init();
//if(err_code != MODULE_ALREADY_INITIALIZED)
APP_ERROR_CHECK(err_code);
nrf_ppi_channel_t ppi_set_ch;
nrf_ppi_channel_t ppi_clr_ch;
err_code = nrf_drv_ppi_channel_alloc(&ppi_set_ch);
!
10