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

gpio interrupt with ble

hi hi ;

i'm trying to control gpio pin 20 with my smart phone and with event at gpio pin 5 (when the state of the pin 5 changes the gpio pin 20 toggeles )
but my problem is when i add the function gpio_init() the ble stops working .

any help will be appreciated

i'm using nrf51822 s110 sdk 9 pca 20006

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
*
* The information contained herein is property of Nordic Semiconductor ASA.
* Terms and conditions of usage are described in detail in NORDIC
* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
*
* Licensees are granted free, non-transferable use of the information. NO
* WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* the file.
*
*/
/** @file
*
* @brief BLE Services, a beginner's tutorial project main file.
*
* This example is meant to be used togheter with the tutorial "BLE Services, a beginner's tutorial"
* found at https://devzone.nordicsemi.com/tutorials/8/ble-services-a-beginners-tutorial/.
* The purpose of this tutorial is to get you started with the basics of the nRF51x22 and Bluetooth Low Energy (BLE).
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdint.h>
#include <string.h>
#include "nrf_gpio.h"
#include "our_service.h"
#include "ble_srv_common.h"
#include "app_error.h"
volatile int iiii=2;
void setvalue(int f)
{
iiii=f;
}
int returnei ()
{
return iiii;
}
static void on_ble_write(ble_os_t * p_our_service, ble_evt_t * p_ble_evt)
{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
our_service.h