Skip to content

Commit

Permalink
Merge pull request #7 from desmond-blue/fix-nrf-section-iter
Browse files Browse the repository at this point in the history
Fix nrf section iter ARMCC compiler macro check
  • Loading branch information
Ralph F authored Jan 24, 2019
2 parents ef632c8 + a883bf7 commit 360b099
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "nrf_section_iter.h"


#if !defined(__GNUC__)
#if !defined(__GNUC__) || defined(__CC_ARM)
static void nrf_section_iter_item_set(nrf_section_iter_t * p_iter)
{
ASSERT(p_iter != NULL);
Expand Down Expand Up @@ -82,7 +82,7 @@ void nrf_section_iter_init(nrf_section_iter_t * p_iter, nrf_section_set_t const

p_iter->p_set = p_set;

#if defined(__GNUC__)
#if defined(__GNUC__) && !defined(__CC_ARM)
p_iter->p_item = p_iter->p_set->section.p_start;
if (p_iter->p_item == p_iter->p_set->section.p_end)
{
Expand All @@ -106,7 +106,7 @@ void nrf_section_iter_next(nrf_section_iter_t * p_iter)

p_iter->p_item = (void *)((size_t)(p_iter->p_item) + p_iter->p_set->item_size);

#if defined(__GNUC__)
#if defined(__GNUC__) && !defined(__CC_ARM)
if (p_iter->p_item == p_iter->p_set->section.p_end)
{
p_iter->p_item = NULL;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ typedef struct
/**@brief Set of the sections description structure. */
typedef struct
{
#if defined(__GNUC__)
#if defined(__GNUC__) && !defined(__CC_ARM)
nrf_section_t section; //!< Description of the set of sections.
/**<
* In case of GCC all sections in the set are sorted and
Expand All @@ -87,7 +87,7 @@ typedef struct
typedef struct
{
nrf_section_set_t const * p_set; //!< Pointer to the appropriate section set.
#if !defined(__GNUC__)
#if !defined(__GNUC__) || defined(__CC_ARM)
nrf_section_t const * p_section; //!< Pointer to the selected section.
/**<
* In case of GCC all sections in the set are sorted and
Expand All @@ -110,7 +110,7 @@ typedef struct
* @param[in] _count Number of the sections in the set. This parameter is ignored in case of GCC.
* @hideinitializer
*/
#if defined(__GNUC__)
#if defined(__GNUC__) && !defined(__CC_ARM)

#define NRF_SECTION_SET_DEF(_name, _type, _count) \
\
Expand Down

0 comments on commit 360b099

Please sign in to comment.