This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to configure Port 1 pin in nrf52833 DK board?

I want to configure port1 pin 8 as output pin but it wont work

#include <stdbool.h>
#include <stdint.h>
#include "nrf_delay.h"
#include "nrf_gpio.h"


#define led0 NRF_GPIO_PIN_MAP(1,8)               // LED0 P1.8
 
/**
 * @brief Function for application main entry.
 */
int main(void)
{
    nrf_gpio_cfg_output(led0); // config the as output pin

    while(1)
    {

          nrf_gpio_pin_toggle(led0);
          nrf_delay_ms(1000);

    }
}

Parents Reply Children
No Data
Related