From f43a404a6500089b271198b0ac469633826f2111 Mon Sep 17 00:00:00 2001
From: Aapo Torkkeli <aamato@utu.fi>
Date: Thu, 24 Oct 2019 09:28:45 +0300
Subject: [PATCH] modified c

---
 ex_7/main.c                              | 32 +++----------------
 ex_7/pca10040/s132/ses/ex7_Release.jlink | 39 ++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 27 deletions(-)
 create mode 100644 ex_7/pca10040/s132/ses/ex7_Release.jlink

diff --git a/ex_7/main.c b/ex_7/main.c
index 672182f..cb3c5c7 100644
--- a/ex_7/main.c
+++ b/ex_7/main.c
@@ -87,7 +87,7 @@
 #include "ble_bas.h"
 
 
-#define DEVICE_NAME                     "Nordic_Template"                       /**< Name of device. Will be included in the advertising data. */
+#define DEVICE_NAME                     "nRF_Aapo"                       /**< Name of device. Will be included in the advertising data. */
 #define MANUFACTURER_NAME               "NordicSemiconductor"                   /**< Manufacturer. Will be passed to Device Information Service. */
 #define APP_ADV_INTERVAL                300                                     /**< The advertising interval (in units of 0.625 ms. This value corresponds to 187.5 ms). */
 
@@ -370,28 +370,6 @@ static void on_yys_evt(ble_yy_service_t     * p_yy_service,
  */
 static void services_init(void)
 {
-    /* YOUR_JOB: Add code to initialize the services used by the application.
-       ble_xxs_init_t                     xxs_init;
-       ble_yys_init_t                     yys_init;
-
-       // Initialize XXX Service.
-       memset(&xxs_init, 0, sizeof(xxs_init));
-
-       xxs_init.evt_handler                = NULL;
-       xxs_init.is_xxx_notify_supported    = true;
-       xxs_init.ble_xx_initial_value.level = 100;
-
-       err_code = ble_bas_init(&m_xxs, &xxs_init);
-       APP_ERROR_CHECK(err_code);
-
-       // Initialize YYY Service.
-       memset(&yys_init, 0, sizeof(yys_init));
-       yys_init.evt_handler                  = on_yys_evt;
-       yys_init.ble_yy_initial_value.counter = 0;
-
-       err_code = ble_yy_service_init(&yys_init, &yy_init);
-       APP_ERROR_CHECK(err_code);
-     */
      ret_code_t err_code;
 
      ble_hts_init_t hts_init;
@@ -408,20 +386,20 @@ static void services_init(void)
      hts_init.ht_type_rd_sec = SEC_OPEN;
      err_code = ble_hts_init(&m_hts, &hts_init);
      APP_ERROR_CHECK(err_code);
-     
+
      // Initialize Battery Service.
      memset(&bas_init, 0, sizeof(bas_init));
-     
+
      // Here the sec level for the Battery Service can be changed/increased.
      bas_init.bl_rd_sec = SEC_OPEN;
      bas_init.bl_cccd_wr_sec = SEC_OPEN;
      bas_init.bl_report_rd_sec = SEC_OPEN;
-     
+
      bas_init.evt_handler = NULL;
      bas_init.support_notification = true;
      bas_init.p_report_ref = NULL;
      bas_init.initial_batt_level = 100;
-     
+
      err_code = ble_bas_init(&m_bas, &bas_init);
      APP_ERROR_CHECK(err_code);
 }
diff --git a/ex_7/pca10040/s132/ses/ex7_Release.jlink b/ex_7/pca10040/s132/ses/ex7_Release.jlink
new file mode 100644
index 0000000..292d9a0
--- /dev/null
+++ b/ex_7/pca10040/s132/ses/ex7_Release.jlink
@@ -0,0 +1,39 @@
+[BREAKPOINTS]
+ForceImpTypeAny = 0
+ShowInfoWin = 1
+EnableFlashBP = 2
+BPDuringExecution = 0
+[CFI]
+CFISize = 0x00
+CFIAddr = 0x00
+[CPU]
+MonModeVTableAddr = 0xFFFFFFFF
+MonModeDebug = 0
+MaxNumAPs = 0
+LowPowerHandlingMode = 0
+OverrideMemMap = 0
+AllowSimulation = 1
+ScriptFile=""
+[FLASH]
+CacheExcludeSize = 0x00
+CacheExcludeAddr = 0x00
+MinNumBytesFlashDL = 0
+SkipProgOnCRCMatch = 1
+VerifyDownload = 1
+AllowCaching = 1
+EnableFlashDL = 2
+Override = 0
+Device="ARM7"
+[GENERAL]
+WorkRAMSize = 0x00
+WorkRAMAddr = 0x00
+RAMUsageLimit = 0x00
+[SWO]
+SWOLogFile=""
+[MEM]
+RdOverrideOrMask = 0x00
+RdOverrideAndMask = 0xFFFFFFFF
+RdOverrideAddr = 0xFFFFFFFF
+WrOverrideOrMask = 0x00
+WrOverrideAndMask = 0xFFFFFFFF
+WrOverrideAddr = 0xFFFFFFFF
-- 
GitLab