nrf8001 examples: minor changes to avoid clang build failures

Signed-off-by: Jon Trulson <jtrulson@ics.com>
This commit is contained in:
Jon Trulson 2017-04-05 18:28:03 -06:00
parent 27dc4a5742
commit cdb697fd7b
2 changed files with 12 additions and 10 deletions

View File

@ -29,6 +29,7 @@
#include <lib_aci.h> #include <lib_aci.h>
#include <aci_setup.h> #include <aci_setup.h>
#include <signal.h> #include <signal.h>
#include <assert.h>
#ifdef SERVICES_PIPE_TYPE_MAPPING_CONTENT #ifdef SERVICES_PIPE_TYPE_MAPPING_CONTENT
static services_pipe_type_mapping_t static services_pipe_type_mapping_t
@ -77,11 +78,11 @@ init_aci_setup () {
/** /**
* Point ACI data structures to the the setup data that the nRFgo studio generated for the nRF8001 * Point ACI data structures to the the setup data that the nRFgo studio generated for the nRF8001
*/ */
if (NULL != services_pipe_type_mapping) { // abort if this is NULL
aci_state.aci_setup_info.services_pipe_type_mapping = &services_pipe_type_mapping[0]; assert(services_pipe_type_mapping != NULL);
} else {
aci_state.aci_setup_info.services_pipe_type_mapping = NULL; aci_state.aci_setup_info.services_pipe_type_mapping =
} &services_pipe_type_mapping[0];
aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES; aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES;
aci_state.aci_setup_info.setup_msgs = setup_msgs; aci_state.aci_setup_info.setup_msgs = setup_msgs;

View File

@ -29,6 +29,7 @@
#include <lib_aci.h> #include <lib_aci.h>
#include <aci_setup.h> #include <aci_setup.h>
#include <signal.h> #include <signal.h>
#include <assert.h>
#include "uart_over_ble.h" #include "uart_over_ble.h"
/* /*
@ -95,11 +96,11 @@ init_aci_setup () {
/** /**
* Point ACI data structures to the the setup data that the nRFgo studio generated for the nRF8001 * Point ACI data structures to the the setup data that the nRFgo studio generated for the nRF8001
*/ */
if (NULL != services_pipe_type_mapping) { // abort if this is NULL
aci_state.aci_setup_info.services_pipe_type_mapping = &services_pipe_type_mapping[0]; assert(services_pipe_type_mapping != NULL);
} else {
aci_state.aci_setup_info.services_pipe_type_mapping = NULL; aci_state.aci_setup_info.services_pipe_type_mapping =
} &services_pipe_type_mapping[0];
aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES; aci_state.aci_setup_info.number_of_pipes = NUMBER_OF_PIPES;
aci_state.aci_setup_info.setup_msgs = setup_msgs; aci_state.aci_setup_info.setup_msgs = setup_msgs;