Skip to content

Commit

Permalink
ifdef for header file inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
cindydeng1998 committed Aug 8, 2020
1 parent 5da3850 commit b5d9c6f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Microchip/ATSAME54-XPRO/app/CMakeLists.txt
Expand Up @@ -15,6 +15,10 @@ set(SOURCES
)

add_executable(${PROJECT_NAME} ${SOURCES})
target_include_directories(${PROJECT_NAME}
PUBLIC
lib/device_config
)

target_link_libraries(${PROJECT_NAME}
PUBLIC
Expand All @@ -30,6 +34,7 @@ target_link_libraries(${PROJECT_NAME}
device_config
)


target_link_options(${PROJECT_NAME}
PRIVATE
-T${LINKER_SCRIPT} -Wl,-Map=${PROJECT_NAME}.map)
Expand Down
5 changes: 5 additions & 0 deletions Microchip/ATSAME54-XPRO/lib/device_config/device_config.h
@@ -1,6 +1,9 @@
/* Copyright (c) Microsoft Corporation.
Licensed under the MIT License. */

#ifndef _DEVICE_CONFIG_H
#define _DEVICE_CONFIG_H

#include <string.h>
#include <stdio.h>
#include <stdbool.h>
Expand Down Expand Up @@ -50,3 +53,5 @@ FLASH_Status_t erase_flash(void);

/* Read Azure IoT credentials from flash */
FLASH_Status_t read_flash(DevConfig_IoT_Info_t* info);

#endif // _DEVICE_CONFIG_H

0 comments on commit b5d9c6f

Please sign in to comment.