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

How Can I Use Dır_Mask Pin Read?

I have a lot of pin_read function. How can i set all port one line? for example P1OUT = (P1.01 | P1.02 | P1.03) or P1IN = (P1.01 | P1.02 | P1.03) I dont know how to use pin mask? 

here is my code and header file;

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdbool.h>
#include <stdint.h>
#include "boards.h"
#include "nrf_delay.h"
#include "nrf_gpio.h"
#include "nrf.h"
#include "nrf_drv_gpiote.h"
#include "app_error.h"
#include "nrf_drv_timer.h"
#include "app_timer.h"
#include "app_button.h"
#include "nrf_drv_ppi.h"
#include "nrf_drv_timer.h"
#include "nrf_fstorage.h"
#include "nordic_common.h"
#include "ble.h"
#include "ble_err.h"
#include "ble_hci.h"
#include "ble_srv_common.h"
#include "ble_advdata.h"
#include "ble_conn_params.h"
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
9
#define SUTUN_1 25
#define SUTUN_2 20
#define SUTUN_3 18
#define SATIR_1 16
#define SATIR_2 15
#define SATIR_3 14
#define SATIR_4 12
#define SATIR_5 10
#define LED_DENEME 24
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX