diff --git a/examples/Makefile b/examples/Makefile
index e7dd23b9..ba389533 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -3,7 +3,7 @@
# `wildcard ./*/` works in both linux and linux/wine, while `wildcard */` enumerates nothing under wine
SUBDIRS = $(sort $(dir $(wildcard ./*/)))
-SUBDIRS:=$(filter-out ./ ./CC3200/ ./ESP8266_RTOS/ ./MSP432/ ./STM32F4_CC3100/, $(SUBDIRS))
+SUBDIRS:=$(filter-out ./ ./CC3200/ ./ESP8266_RTOS/ ./MSP432/ ./PIC32/ ./STM32F4_CC3100/, $(SUBDIRS))
ifeq ($(OS), Windows_NT)
SUBDIRS:=$(filter-out ./load_balancer/ ./netcat/ ./raspberry_pi_mjpeg_led/ ./captive_dns_server/, $(SUBDIRS))
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/Makefile b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/Makefile
new file mode 100644
index 00000000..fca8e2cc
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/Makefile
@@ -0,0 +1,113 @@
+#
+# There exist several targets which are by default empty and which can be
+# used for execution of your targets. These targets are usually executed
+# before and after some main targets. They are:
+#
+# .build-pre: called before 'build' target
+# .build-post: called after 'build' target
+# .clean-pre: called before 'clean' target
+# .clean-post: called after 'clean' target
+# .clobber-pre: called before 'clobber' target
+# .clobber-post: called after 'clobber' target
+# .all-pre: called before 'all' target
+# .all-post: called after 'all' target
+# .help-pre: called before 'help' target
+# .help-post: called after 'help' target
+#
+# Targets beginning with '.' are not intended to be called on their own.
+#
+# Main targets can be executed directly, and they are:
+#
+# build build a specific configuration
+# clean remove built files from a configuration
+# clobber remove all built files
+# all build all configurations
+# help print help mesage
+#
+# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
+# .help-impl are implemented in nbproject/makefile-impl.mk.
+#
+# Available make variables:
+#
+# CND_BASEDIR base directory for relative paths
+# CND_DISTDIR default top distribution directory (build artifacts)
+# CND_BUILDDIR default top build directory (object files, ...)
+# CONF name of current configuration
+# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
+# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
+# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
+# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
+# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
+# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
+#
+# NOCDDL
+
+
+# Environment
+MKDIR=mkdir
+CP=cp
+CCADMIN=CCadmin
+RANLIB=ranlib
+
+
+# build
+build: .build-post
+
+.build-pre:
+# Add your pre 'build' code here...
+
+.build-post: .build-impl
+# Add your post 'build' code here...
+
+
+# clean
+clean: .clean-post
+
+.clean-pre:
+# Add your pre 'clean' code here...
+# WARNING: the IDE does not call this target since it takes a long time to
+# simply run make. Instead, the IDE removes the configuration directories
+# under build and dist directly without calling make.
+# This target is left here so people can do a clean when running a clean
+# outside the IDE.
+
+.clean-post: .clean-impl
+# Add your post 'clean' code here...
+
+
+# clobber
+clobber: .clobber-post
+
+.clobber-pre:
+# Add your pre 'clobber' code here...
+
+.clobber-post: .clobber-impl
+# Add your post 'clobber' code here...
+
+
+# all
+all: .all-post
+
+.all-pre:
+# Add your pre 'all' code here...
+
+.all-post: .all-impl
+# Add your post 'all' code here...
+
+
+# help
+help: .help-post
+
+.help-pre:
+# Add your pre 'help' code here...
+
+.help-post: .help-impl
+# Add your post 'help' code here...
+
+
+
+# include project implementation makefile
+include nbproject/Makefile-impl.mk
+
+# include project make variables
+include nbproject/Makefile-variables.mk
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-genesis.properties b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-genesis.properties
new file mode 100644
index 00000000..0d27c424
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-genesis.properties
@@ -0,0 +1,9 @@
+#
+#Fri Sep 30 14:33:25 EEST 2016
+mx795_CC3100_e16.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=7787462309de955deefcc6f5508f88a9
+mx795_CC3100_e16.languagetoolchain.version=1.42
+configurations-xml=57b90aa5c34b820a6cb86bde88422e21
+com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=02b44c60b7ea0aab28d65f169487b894
+host.platform=linux
+conf.ids=mx795_CC3100_e16
+mx795_CC3100_e16.languagetoolchain.dir=/opt/microchip/xc32/v1.42/bin
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-impl.mk b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-impl.mk
new file mode 100644
index 00000000..a45555fa
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-impl.mk
@@ -0,0 +1,69 @@
+#
+# Generated Makefile - do not edit!
+#
+# Edit the Makefile in the project folder instead (../Makefile). Each target
+# has a pre- and a post- target defined where you can add customization code.
+#
+# This makefile implements macros and targets common to all configurations.
+#
+# NOCDDL
+
+
+# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
+# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
+# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
+# and .clean-reqprojects-conf unless SUB has the value 'no'
+SUB_no=NO
+SUBPROJECTS=${SUB_${SUB}}
+BUILD_SUBPROJECTS_=.build-subprojects
+BUILD_SUBPROJECTS_NO=
+BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
+CLEAN_SUBPROJECTS_=.clean-subprojects
+CLEAN_SUBPROJECTS_NO=
+CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
+
+
+# Project Name
+PROJECTNAME=mqtt_client.X
+
+# Active Configuration
+DEFAULTCONF=mx795_CC3100_e16
+CONF=${DEFAULTCONF}
+
+# All Configurations
+ALLCONFS=mx795_CC3100_e16
+
+
+# build
+.build-impl: .build-pre
+ ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf
+
+
+# clean
+.clean-impl: .clean-pre
+ ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf
+
+# clobber
+.clobber-impl: .clobber-pre .depcheck-impl
+ ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=mx795_CC3100_e16 clean
+
+
+
+# all
+.all-impl: .all-pre .depcheck-impl
+ ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=mx795_CC3100_e16 build
+
+
+
+# dependency checking support
+.depcheck-impl:
+# @echo "# This code depends on make tool being used" >.dep.inc
+# @if [ -n "${MAKE_VERSION}" ]; then \
+# echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \
+# echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
+# echo "include \$${DEPFILES}" >>.dep.inc; \
+# echo "endif" >>.dep.inc; \
+# else \
+# echo ".KEEP_STATE:" >>.dep.inc; \
+# echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
+# fi
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-local-mx795_CC3100_e16.mk b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-local-mx795_CC3100_e16.mk
new file mode 100644
index 00000000..5e5a4209
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-local-mx795_CC3100_e16.mk
@@ -0,0 +1,36 @@
+#
+# Generated Makefile - do not edit!
+#
+#
+# This file contains information about the location of compilers and other tools.
+# If you commmit this file into your revision control server, you will be able to
+# to checkout the project and build it from the command line with make. However,
+# if more than one person works on the same project, then this file might show
+# conflicts since different users are bound to have compilers in different places.
+# In that case you might choose to not commit this file and let MPLAB X recreate this file
+# for each user. The disadvantage of not commiting this file is that you must run MPLAB X at
+# least once so the file gets created and the project can be built. Finally, you can also
+# avoid using this file at all if you are only building from the command line with make.
+# You can invoke make with the values of the macros:
+# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
+#
+PATH_TO_IDE_BIN=/opt/microchip/mplabx/v3.40/mplab_ide/platform/../mplab_ide/modules/../../bin/
+# Adding MPLAB X bin directory to path.
+PATH:=/opt/microchip/mplabx/v3.40/mplab_ide/platform/../mplab_ide/modules/../../bin/:$(PATH)
+# Path to java used to run MPLAB X when this makefile was created
+MP_JAVA_PATH="/opt/microchip/mplabx/v3.40/sys/java/jre1.8.0_91/bin/"
+OS_CURRENT="$(shell uname -s)"
+MP_CC="/opt/microchip/xc32/v1.42/bin/xc32-gcc"
+MP_CPPC="/opt/microchip/xc32/v1.42/bin/xc32-g++"
+# MP_BC is not defined
+MP_AS="/opt/microchip/xc32/v1.42/bin/xc32-as"
+MP_LD="/opt/microchip/xc32/v1.42/bin/xc32-ld"
+MP_AR="/opt/microchip/xc32/v1.42/bin/xc32-ar"
+DEP_GEN=${MP_JAVA_PATH}java -jar "/opt/microchip/mplabx/v3.40/mplab_ide/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
+MP_CC_DIR="/opt/microchip/xc32/v1.42/bin"
+MP_CPPC_DIR="/opt/microchip/xc32/v1.42/bin"
+# MP_BC_DIR is not defined
+MP_AS_DIR="/opt/microchip/xc32/v1.42/bin"
+MP_LD_DIR="/opt/microchip/xc32/v1.42/bin"
+MP_AR_DIR="/opt/microchip/xc32/v1.42/bin"
+# MP_BC_DIR is not defined
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-mx795_CC3100_e16.mk b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-mx795_CC3100_e16.mk
new file mode 100644
index 00000000..69c49247
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-mx795_CC3100_e16.mk
@@ -0,0 +1,529 @@
+#
+# Generated Makefile - do not edit!
+#
+# Edit the Makefile in the project folder instead (../Makefile). Each target
+# has a -pre and a -post target defined where you can add customized code.
+#
+# This makefile implements configuration specific macros and targets.
+
+
+# Include project Makefile
+ifeq "${IGNORE_LOCAL}" "TRUE"
+# do not include local makefile. User is passing all local related variables already
+else
+include Makefile
+# Include makefile containing local settings
+ifeq "$(wildcard nbproject/Makefile-local-mx795_CC3100_e16.mk)" "nbproject/Makefile-local-mx795_CC3100_e16.mk"
+include nbproject/Makefile-local-mx795_CC3100_e16.mk
+endif
+endif
+
+# Environment
+MKDIR=mkdir -p
+RM=rm -f
+MV=mv
+CP=cp
+
+# Macros
+CND_CONF=mx795_CC3100_e16
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+IMAGE_TYPE=debug
+OUTPUT_SUFFIX=elf
+DEBUGGABLE_SUFFIX=elf
+FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/mqtt_client.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
+else
+IMAGE_TYPE=production
+OUTPUT_SUFFIX=hex
+DEBUGGABLE_SUFFIX=elf
+FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/mqtt_client.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
+endif
+
+ifeq ($(COMPARE_BUILD), true)
+COMPARISON_BUILD=-mafrlcsj
+else
+COMPARISON_BUILD=
+endif
+
+# Object Directory
+OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}
+
+# Distribution Directory
+DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
+
+# Source Files Quoted if spaced
+SOURCEFILES_QUOTED_IF_SPACED=../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netcfg.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/device.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/driver.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/fs.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/wlan.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/socket.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netapp.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/nonos.c ../src/system_config/mx795_CC3100_e16/framework/driver/rtcc/src/drv_rtcc_static.c ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static.c ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_mapping.c ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_tasks.c ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.c ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_rm_tasks.c ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_mapping.c ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static.c ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_byte_model.c ../src/system_config/mx795_CC3100_e16/framework/system/clk/src/sys_clk_static.c ../src/system_config/mx795_CC3100_e16/framework/system/console/src/sys_console_static.c ../src/system_config/mx795_CC3100_e16/framework/system/ports/src/sys_ports_static.c ../src/system_config/mx795_CC3100_e16/system_init.c ../src/system_config/mx795_CC3100_e16/system_interrupt.c ../src/system_config/mx795_CC3100_e16/system_exceptions.c ../src/system_config/mx795_CC3100_e16/system_tasks.c ../src/app.c ../src/main.c ../src/cc3100_port.c ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug.c ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon.c ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_pic32mx.c ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_pic32.c ../../../../../mongoose.c
+
+# Object Files Quoted if spaced
+OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/_ext/1831220292/netcfg.o ${OBJECTDIR}/_ext/1831220292/device.o ${OBJECTDIR}/_ext/1831220292/driver.o ${OBJECTDIR}/_ext/1831220292/fs.o ${OBJECTDIR}/_ext/1831220292/wlan.o ${OBJECTDIR}/_ext/1831220292/socket.o ${OBJECTDIR}/_ext/1831220292/netapp.o ${OBJECTDIR}/_ext/1831220292/nonos.o ${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o ${OBJECTDIR}/_ext/1474605348/drv_spi_static.o ${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o ${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o ${OBJECTDIR}/_ext/453830916/drv_usart_static.o ${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o ${OBJECTDIR}/_ext/1456866848/sys_clk_static.o ${OBJECTDIR}/_ext/1510159531/sys_console_static.o ${OBJECTDIR}/_ext/1602879792/sys_ports_static.o ${OBJECTDIR}/_ext/1396533431/system_init.o ${OBJECTDIR}/_ext/1396533431/system_interrupt.o ${OBJECTDIR}/_ext/1396533431/system_exceptions.o ${OBJECTDIR}/_ext/1396533431/system_tasks.o ${OBJECTDIR}/_ext/1360937237/app.o ${OBJECTDIR}/_ext/1360937237/main.o ${OBJECTDIR}/_ext/1360937237/cc3100_port.o ${OBJECTDIR}/_ext/1952159421/sys_debug.o ${OBJECTDIR}/_ext/1921105363/sys_devcon.o ${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o ${OBJECTDIR}/_ext/993332121/sys_int_pic32.o ${OBJECTDIR}/_ext/948168960/mongoose.o
+POSSIBLE_DEPFILES=${OBJECTDIR}/_ext/1831220292/netcfg.o.d ${OBJECTDIR}/_ext/1831220292/device.o.d ${OBJECTDIR}/_ext/1831220292/driver.o.d ${OBJECTDIR}/_ext/1831220292/fs.o.d ${OBJECTDIR}/_ext/1831220292/wlan.o.d ${OBJECTDIR}/_ext/1831220292/socket.o.d ${OBJECTDIR}/_ext/1831220292/netapp.o.d ${OBJECTDIR}/_ext/1831220292/nonos.o.d ${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o.d ${OBJECTDIR}/_ext/1474605348/drv_spi_static.o.d ${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o.d ${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o.d ${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o.d ${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o.d ${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o.d ${OBJECTDIR}/_ext/453830916/drv_usart_static.o.d ${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o.d ${OBJECTDIR}/_ext/1456866848/sys_clk_static.o.d ${OBJECTDIR}/_ext/1510159531/sys_console_static.o.d ${OBJECTDIR}/_ext/1602879792/sys_ports_static.o.d ${OBJECTDIR}/_ext/1396533431/system_init.o.d ${OBJECTDIR}/_ext/1396533431/system_interrupt.o.d ${OBJECTDIR}/_ext/1396533431/system_exceptions.o.d ${OBJECTDIR}/_ext/1396533431/system_tasks.o.d ${OBJECTDIR}/_ext/1360937237/app.o.d ${OBJECTDIR}/_ext/1360937237/main.o.d ${OBJECTDIR}/_ext/1360937237/cc3100_port.o.d ${OBJECTDIR}/_ext/1952159421/sys_debug.o.d ${OBJECTDIR}/_ext/1921105363/sys_devcon.o.d ${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o.d ${OBJECTDIR}/_ext/993332121/sys_int_pic32.o.d ${OBJECTDIR}/_ext/948168960/mongoose.o.d
+
+# Object Files
+OBJECTFILES=${OBJECTDIR}/_ext/1831220292/netcfg.o ${OBJECTDIR}/_ext/1831220292/device.o ${OBJECTDIR}/_ext/1831220292/driver.o ${OBJECTDIR}/_ext/1831220292/fs.o ${OBJECTDIR}/_ext/1831220292/wlan.o ${OBJECTDIR}/_ext/1831220292/socket.o ${OBJECTDIR}/_ext/1831220292/netapp.o ${OBJECTDIR}/_ext/1831220292/nonos.o ${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o ${OBJECTDIR}/_ext/1474605348/drv_spi_static.o ${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o ${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o ${OBJECTDIR}/_ext/453830916/drv_usart_static.o ${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o ${OBJECTDIR}/_ext/1456866848/sys_clk_static.o ${OBJECTDIR}/_ext/1510159531/sys_console_static.o ${OBJECTDIR}/_ext/1602879792/sys_ports_static.o ${OBJECTDIR}/_ext/1396533431/system_init.o ${OBJECTDIR}/_ext/1396533431/system_interrupt.o ${OBJECTDIR}/_ext/1396533431/system_exceptions.o ${OBJECTDIR}/_ext/1396533431/system_tasks.o ${OBJECTDIR}/_ext/1360937237/app.o ${OBJECTDIR}/_ext/1360937237/main.o ${OBJECTDIR}/_ext/1360937237/cc3100_port.o ${OBJECTDIR}/_ext/1952159421/sys_debug.o ${OBJECTDIR}/_ext/1921105363/sys_devcon.o ${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o ${OBJECTDIR}/_ext/993332121/sys_int_pic32.o ${OBJECTDIR}/_ext/948168960/mongoose.o
+
+# Source Files
+SOURCEFILES=../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netcfg.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/device.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/driver.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/fs.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/wlan.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/socket.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netapp.c ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/nonos.c ../src/system_config/mx795_CC3100_e16/framework/driver/rtcc/src/drv_rtcc_static.c ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static.c ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_mapping.c ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_tasks.c ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.c ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_rm_tasks.c ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_mapping.c ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static.c ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_byte_model.c ../src/system_config/mx795_CC3100_e16/framework/system/clk/src/sys_clk_static.c ../src/system_config/mx795_CC3100_e16/framework/system/console/src/sys_console_static.c ../src/system_config/mx795_CC3100_e16/framework/system/ports/src/sys_ports_static.c ../src/system_config/mx795_CC3100_e16/system_init.c ../src/system_config/mx795_CC3100_e16/system_interrupt.c ../src/system_config/mx795_CC3100_e16/system_exceptions.c ../src/system_config/mx795_CC3100_e16/system_tasks.c ../src/app.c ../src/main.c ../src/cc3100_port.c ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug.c ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon.c ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_pic32mx.c ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_pic32.c ../../../../../mongoose.c
+
+
+CFLAGS=
+ASFLAGS=
+LDLIBSOPTIONS=
+
+############# Tool locations ##########################################
+# If you copy a project from one host to another, the path where the #
+# compiler is installed may be different. #
+# If you open this project with MPLAB X in the new host, this #
+# makefile will be regenerated and the paths will be corrected. #
+#######################################################################
+# fixDeps replaces a bunch of sed/cat/printf statements that slow down the build
+FIXDEPS=fixDeps
+
+.build-conf: ${BUILD_SUBPROJECTS}
+ifneq ($(INFORMATION_MESSAGE), )
+ @echo $(INFORMATION_MESSAGE)
+endif
+ ${MAKE} -f nbproject/Makefile-mx795_CC3100_e16.mk dist/${CND_CONF}/${IMAGE_TYPE}/mqtt_client.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
+
+MP_PROCESSOR_OPTION=32MX795F512L
+MP_LINKER_FILE_OPTION=
+# ------------------------------------------------------------------------------------
+# Rules for buildStep: assemble
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+else
+endif
+
+# ------------------------------------------------------------------------------------
+# Rules for buildStep: assembleWithPreprocess
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+else
+endif
+
+# ------------------------------------------------------------------------------------
+# Rules for buildStep: compile
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+${OBJECTDIR}/_ext/1831220292/netcfg.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netcfg.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/netcfg.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/netcfg.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/netcfg.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/netcfg.o.d" -o ${OBJECTDIR}/_ext/1831220292/netcfg.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netcfg.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/device.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/device.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/device.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/device.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/device.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/device.o.d" -o ${OBJECTDIR}/_ext/1831220292/device.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/device.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/driver.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/driver.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/driver.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/driver.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/driver.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/driver.o.d" -o ${OBJECTDIR}/_ext/1831220292/driver.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/driver.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/fs.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/fs.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/fs.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/fs.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/fs.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/fs.o.d" -o ${OBJECTDIR}/_ext/1831220292/fs.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/fs.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/wlan.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/wlan.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/wlan.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/wlan.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/wlan.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/wlan.o.d" -o ${OBJECTDIR}/_ext/1831220292/wlan.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/wlan.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/socket.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/socket.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/socket.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/socket.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/socket.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/socket.o.d" -o ${OBJECTDIR}/_ext/1831220292/socket.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/socket.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/netapp.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netapp.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/netapp.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/netapp.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/netapp.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/netapp.o.d" -o ${OBJECTDIR}/_ext/1831220292/netapp.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netapp.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/nonos.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/nonos.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/nonos.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/nonos.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/nonos.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/nonos.o.d" -o ${OBJECTDIR}/_ext/1831220292/nonos.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/nonos.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o: ../src/system_config/mx795_CC3100_e16/framework/driver/rtcc/src/drv_rtcc_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1227741461"
+ @${RM} ${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o.d" -o ${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o ../src/system_config/mx795_CC3100_e16/framework/driver/rtcc/src/drv_rtcc_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1474605348/drv_spi_static.o: ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1474605348"
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1474605348/drv_spi_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1474605348/drv_spi_static.o.d" -o ${OBJECTDIR}/_ext/1474605348/drv_spi_static.o ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o: ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_mapping.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1474605348"
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o.d
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o.d" -o ${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_mapping.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o: ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_tasks.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1474605348"
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o.d
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o.d" -o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_tasks.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o: ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1474605348"
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o.d
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o.d" -o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o: ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_rm_tasks.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1474605348"
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o.d
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o.d" -o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_rm_tasks.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o: ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_mapping.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/453830916"
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o.d
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o.d" -o ${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_mapping.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/453830916/drv_usart_static.o: ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/453830916"
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/453830916/drv_usart_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/453830916/drv_usart_static.o.d" -o ${OBJECTDIR}/_ext/453830916/drv_usart_static.o ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o: ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_byte_model.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/453830916"
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o.d
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o.d" -o ${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_byte_model.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1456866848/sys_clk_static.o: ../src/system_config/mx795_CC3100_e16/framework/system/clk/src/sys_clk_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1456866848"
+ @${RM} ${OBJECTDIR}/_ext/1456866848/sys_clk_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/1456866848/sys_clk_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1456866848/sys_clk_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1456866848/sys_clk_static.o.d" -o ${OBJECTDIR}/_ext/1456866848/sys_clk_static.o ../src/system_config/mx795_CC3100_e16/framework/system/clk/src/sys_clk_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1510159531/sys_console_static.o: ../src/system_config/mx795_CC3100_e16/framework/system/console/src/sys_console_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1510159531"
+ @${RM} ${OBJECTDIR}/_ext/1510159531/sys_console_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/1510159531/sys_console_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1510159531/sys_console_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1510159531/sys_console_static.o.d" -o ${OBJECTDIR}/_ext/1510159531/sys_console_static.o ../src/system_config/mx795_CC3100_e16/framework/system/console/src/sys_console_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1602879792/sys_ports_static.o: ../src/system_config/mx795_CC3100_e16/framework/system/ports/src/sys_ports_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1602879792"
+ @${RM} ${OBJECTDIR}/_ext/1602879792/sys_ports_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/1602879792/sys_ports_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1602879792/sys_ports_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1602879792/sys_ports_static.o.d" -o ${OBJECTDIR}/_ext/1602879792/sys_ports_static.o ../src/system_config/mx795_CC3100_e16/framework/system/ports/src/sys_ports_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1396533431/system_init.o: ../src/system_config/mx795_CC3100_e16/system_init.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1396533431"
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_init.o.d
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_init.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1396533431/system_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1396533431/system_init.o.d" -o ${OBJECTDIR}/_ext/1396533431/system_init.o ../src/system_config/mx795_CC3100_e16/system_init.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1396533431/system_interrupt.o: ../src/system_config/mx795_CC3100_e16/system_interrupt.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1396533431"
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_interrupt.o.d
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_interrupt.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1396533431/system_interrupt.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1396533431/system_interrupt.o.d" -o ${OBJECTDIR}/_ext/1396533431/system_interrupt.o ../src/system_config/mx795_CC3100_e16/system_interrupt.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1396533431/system_exceptions.o: ../src/system_config/mx795_CC3100_e16/system_exceptions.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1396533431"
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_exceptions.o.d
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_exceptions.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1396533431/system_exceptions.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1396533431/system_exceptions.o.d" -o ${OBJECTDIR}/_ext/1396533431/system_exceptions.o ../src/system_config/mx795_CC3100_e16/system_exceptions.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1396533431/system_tasks.o: ../src/system_config/mx795_CC3100_e16/system_tasks.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1396533431"
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_tasks.o.d
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_tasks.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1396533431/system_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1396533431/system_tasks.o.d" -o ${OBJECTDIR}/_ext/1396533431/system_tasks.o ../src/system_config/mx795_CC3100_e16/system_tasks.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1360937237/app.o: ../src/app.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1360937237"
+ @${RM} ${OBJECTDIR}/_ext/1360937237/app.o.d
+ @${RM} ${OBJECTDIR}/_ext/1360937237/app.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app.o.d" -o ${OBJECTDIR}/_ext/1360937237/app.o ../src/app.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1360937237/main.o: ../src/main.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1360937237"
+ @${RM} ${OBJECTDIR}/_ext/1360937237/main.o.d
+ @${RM} ${OBJECTDIR}/_ext/1360937237/main.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1360937237/main.o.d" -o ${OBJECTDIR}/_ext/1360937237/main.o ../src/main.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1360937237/cc3100_port.o: ../src/cc3100_port.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1360937237"
+ @${RM} ${OBJECTDIR}/_ext/1360937237/cc3100_port.o.d
+ @${RM} ${OBJECTDIR}/_ext/1360937237/cc3100_port.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/cc3100_port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1360937237/cc3100_port.o.d" -o ${OBJECTDIR}/_ext/1360937237/cc3100_port.o ../src/cc3100_port.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1952159421/sys_debug.o: ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1952159421"
+ @${RM} ${OBJECTDIR}/_ext/1952159421/sys_debug.o.d
+ @${RM} ${OBJECTDIR}/_ext/1952159421/sys_debug.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1952159421/sys_debug.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1952159421/sys_debug.o.d" -o ${OBJECTDIR}/_ext/1952159421/sys_debug.o ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1921105363/sys_devcon.o: ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1921105363"
+ @${RM} ${OBJECTDIR}/_ext/1921105363/sys_devcon.o.d
+ @${RM} ${OBJECTDIR}/_ext/1921105363/sys_devcon.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1921105363/sys_devcon.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1921105363/sys_devcon.o.d" -o ${OBJECTDIR}/_ext/1921105363/sys_devcon.o ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o: ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_pic32mx.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1921105363"
+ @${RM} ${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o.d
+ @${RM} ${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_pic32mx.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/993332121/sys_int_pic32.o: ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_pic32.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/993332121"
+ @${RM} ${OBJECTDIR}/_ext/993332121/sys_int_pic32.o.d
+ @${RM} ${OBJECTDIR}/_ext/993332121/sys_int_pic32.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/993332121/sys_int_pic32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/993332121/sys_int_pic32.o.d" -o ${OBJECTDIR}/_ext/993332121/sys_int_pic32.o ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_pic32.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/948168960/mongoose.o: ../../../../../mongoose.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/948168960"
+ @${RM} ${OBJECTDIR}/_ext/948168960/mongoose.o.d
+ @${RM} ${OBJECTDIR}/_ext/948168960/mongoose.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/948168960/mongoose.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -D__DEBUG -D__MPLAB_DEBUGGER_PK3=1 -fframe-base-loclist -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/948168960/mongoose.o.d" -o ${OBJECTDIR}/_ext/948168960/mongoose.o ../../../../../mongoose.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+else
+${OBJECTDIR}/_ext/1831220292/netcfg.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netcfg.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/netcfg.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/netcfg.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/netcfg.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/netcfg.o.d" -o ${OBJECTDIR}/_ext/1831220292/netcfg.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netcfg.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/device.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/device.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/device.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/device.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/device.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/device.o.d" -o ${OBJECTDIR}/_ext/1831220292/device.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/device.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/driver.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/driver.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/driver.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/driver.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/driver.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/driver.o.d" -o ${OBJECTDIR}/_ext/1831220292/driver.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/driver.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/fs.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/fs.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/fs.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/fs.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/fs.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/fs.o.d" -o ${OBJECTDIR}/_ext/1831220292/fs.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/fs.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/wlan.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/wlan.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/wlan.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/wlan.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/wlan.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/wlan.o.d" -o ${OBJECTDIR}/_ext/1831220292/wlan.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/wlan.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/socket.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/socket.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/socket.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/socket.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/socket.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/socket.o.d" -o ${OBJECTDIR}/_ext/1831220292/socket.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/socket.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/netapp.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netapp.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/netapp.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/netapp.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/netapp.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/netapp.o.d" -o ${OBJECTDIR}/_ext/1831220292/netapp.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netapp.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1831220292/nonos.o: ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/nonos.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1831220292"
+ @${RM} ${OBJECTDIR}/_ext/1831220292/nonos.o.d
+ @${RM} ${OBJECTDIR}/_ext/1831220292/nonos.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1831220292/nonos.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1831220292/nonos.o.d" -o ${OBJECTDIR}/_ext/1831220292/nonos.o ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/nonos.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o: ../src/system_config/mx795_CC3100_e16/framework/driver/rtcc/src/drv_rtcc_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1227741461"
+ @${RM} ${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o.d" -o ${OBJECTDIR}/_ext/1227741461/drv_rtcc_static.o ../src/system_config/mx795_CC3100_e16/framework/driver/rtcc/src/drv_rtcc_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1474605348/drv_spi_static.o: ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1474605348"
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1474605348/drv_spi_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1474605348/drv_spi_static.o.d" -o ${OBJECTDIR}/_ext/1474605348/drv_spi_static.o ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o: ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_mapping.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1474605348"
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o.d
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o.d" -o ${OBJECTDIR}/_ext/1474605348/drv_spi_mapping.o ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_mapping.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o: ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_tasks.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1474605348"
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o.d
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o.d" -o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_tasks.o ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_tasks.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o: ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1474605348"
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o.d
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o.d" -o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_sys_queue.o ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o: ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_rm_tasks.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1474605348"
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o.d
+ @${RM} ${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o.d" -o ${OBJECTDIR}/_ext/1474605348/drv_spi_static_rm_tasks.o ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_rm_tasks.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o: ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_mapping.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/453830916"
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o.d
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o.d" -o ${OBJECTDIR}/_ext/453830916/drv_usart_mapping.o ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_mapping.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/453830916/drv_usart_static.o: ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/453830916"
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/453830916/drv_usart_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/453830916/drv_usart_static.o.d" -o ${OBJECTDIR}/_ext/453830916/drv_usart_static.o ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o: ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_byte_model.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/453830916"
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o.d
+ @${RM} ${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o.d" -o ${OBJECTDIR}/_ext/453830916/drv_usart_static_byte_model.o ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_byte_model.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1456866848/sys_clk_static.o: ../src/system_config/mx795_CC3100_e16/framework/system/clk/src/sys_clk_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1456866848"
+ @${RM} ${OBJECTDIR}/_ext/1456866848/sys_clk_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/1456866848/sys_clk_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1456866848/sys_clk_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1456866848/sys_clk_static.o.d" -o ${OBJECTDIR}/_ext/1456866848/sys_clk_static.o ../src/system_config/mx795_CC3100_e16/framework/system/clk/src/sys_clk_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1510159531/sys_console_static.o: ../src/system_config/mx795_CC3100_e16/framework/system/console/src/sys_console_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1510159531"
+ @${RM} ${OBJECTDIR}/_ext/1510159531/sys_console_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/1510159531/sys_console_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1510159531/sys_console_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1510159531/sys_console_static.o.d" -o ${OBJECTDIR}/_ext/1510159531/sys_console_static.o ../src/system_config/mx795_CC3100_e16/framework/system/console/src/sys_console_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1602879792/sys_ports_static.o: ../src/system_config/mx795_CC3100_e16/framework/system/ports/src/sys_ports_static.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1602879792"
+ @${RM} ${OBJECTDIR}/_ext/1602879792/sys_ports_static.o.d
+ @${RM} ${OBJECTDIR}/_ext/1602879792/sys_ports_static.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1602879792/sys_ports_static.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1602879792/sys_ports_static.o.d" -o ${OBJECTDIR}/_ext/1602879792/sys_ports_static.o ../src/system_config/mx795_CC3100_e16/framework/system/ports/src/sys_ports_static.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1396533431/system_init.o: ../src/system_config/mx795_CC3100_e16/system_init.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1396533431"
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_init.o.d
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_init.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1396533431/system_init.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1396533431/system_init.o.d" -o ${OBJECTDIR}/_ext/1396533431/system_init.o ../src/system_config/mx795_CC3100_e16/system_init.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1396533431/system_interrupt.o: ../src/system_config/mx795_CC3100_e16/system_interrupt.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1396533431"
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_interrupt.o.d
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_interrupt.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1396533431/system_interrupt.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1396533431/system_interrupt.o.d" -o ${OBJECTDIR}/_ext/1396533431/system_interrupt.o ../src/system_config/mx795_CC3100_e16/system_interrupt.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1396533431/system_exceptions.o: ../src/system_config/mx795_CC3100_e16/system_exceptions.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1396533431"
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_exceptions.o.d
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_exceptions.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1396533431/system_exceptions.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1396533431/system_exceptions.o.d" -o ${OBJECTDIR}/_ext/1396533431/system_exceptions.o ../src/system_config/mx795_CC3100_e16/system_exceptions.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1396533431/system_tasks.o: ../src/system_config/mx795_CC3100_e16/system_tasks.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1396533431"
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_tasks.o.d
+ @${RM} ${OBJECTDIR}/_ext/1396533431/system_tasks.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1396533431/system_tasks.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1396533431/system_tasks.o.d" -o ${OBJECTDIR}/_ext/1396533431/system_tasks.o ../src/system_config/mx795_CC3100_e16/system_tasks.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1360937237/app.o: ../src/app.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1360937237"
+ @${RM} ${OBJECTDIR}/_ext/1360937237/app.o.d
+ @${RM} ${OBJECTDIR}/_ext/1360937237/app.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1360937237/app.o.d" -o ${OBJECTDIR}/_ext/1360937237/app.o ../src/app.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1360937237/main.o: ../src/main.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1360937237"
+ @${RM} ${OBJECTDIR}/_ext/1360937237/main.o.d
+ @${RM} ${OBJECTDIR}/_ext/1360937237/main.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/main.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1360937237/main.o.d" -o ${OBJECTDIR}/_ext/1360937237/main.o ../src/main.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1360937237/cc3100_port.o: ../src/cc3100_port.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1360937237"
+ @${RM} ${OBJECTDIR}/_ext/1360937237/cc3100_port.o.d
+ @${RM} ${OBJECTDIR}/_ext/1360937237/cc3100_port.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1360937237/cc3100_port.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1360937237/cc3100_port.o.d" -o ${OBJECTDIR}/_ext/1360937237/cc3100_port.o ../src/cc3100_port.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1952159421/sys_debug.o: ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1952159421"
+ @${RM} ${OBJECTDIR}/_ext/1952159421/sys_debug.o.d
+ @${RM} ${OBJECTDIR}/_ext/1952159421/sys_debug.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1952159421/sys_debug.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1952159421/sys_debug.o.d" -o ${OBJECTDIR}/_ext/1952159421/sys_debug.o ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1921105363/sys_devcon.o: ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1921105363"
+ @${RM} ${OBJECTDIR}/_ext/1921105363/sys_devcon.o.d
+ @${RM} ${OBJECTDIR}/_ext/1921105363/sys_devcon.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1921105363/sys_devcon.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1921105363/sys_devcon.o.d" -o ${OBJECTDIR}/_ext/1921105363/sys_devcon.o ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o: ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_pic32mx.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/1921105363"
+ @${RM} ${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o.d
+ @${RM} ${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o.d" -o ${OBJECTDIR}/_ext/1921105363/sys_devcon_pic32mx.o ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_pic32mx.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/993332121/sys_int_pic32.o: ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_pic32.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/993332121"
+ @${RM} ${OBJECTDIR}/_ext/993332121/sys_int_pic32.o.d
+ @${RM} ${OBJECTDIR}/_ext/993332121/sys_int_pic32.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/993332121/sys_int_pic32.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/993332121/sys_int_pic32.o.d" -o ${OBJECTDIR}/_ext/993332121/sys_int_pic32.o ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_pic32.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+${OBJECTDIR}/_ext/948168960/mongoose.o: ../../../../../mongoose.c nbproject/Makefile-${CND_CONF}.mk
+ @${MKDIR} "${OBJECTDIR}/_ext/948168960"
+ @${RM} ${OBJECTDIR}/_ext/948168960/mongoose.o.d
+ @${RM} ${OBJECTDIR}/_ext/948168960/mongoose.o
+ @${FIXDEPS} "${OBJECTDIR}/_ext/948168960/mongoose.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ -c ${MP_CC} $(MP_EXTRA_CC_PRE) -g -x c -c -mprocessor=$(MP_PROCESSOR_OPTION) -I"/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include" -ffunction-sections -O1 -I"../src" -I"../src/system_config/mx795_CC3100_e16" -I"../src/mx795_CC3100_e16" -I"../../../../framework" -I"../src/system_config/mx795_CC3100_e16/framework" -I"../../../../../../../../../microchip/harmony/v1_08_01/framework" -MMD -MF "${OBJECTDIR}/_ext/948168960/mongoose.o.d" -o ${OBJECTDIR}/_ext/948168960/mongoose.o ../../../../../mongoose.c -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc $(COMPARISON_BUILD) -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI
+
+endif
+
+# ------------------------------------------------------------------------------------
+# Rules for buildStep: compileCPP
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+else
+endif
+
+# ------------------------------------------------------------------------------------
+# Rules for buildStep: link
+ifeq ($(TYPE_IMAGE), DEBUG_RUN)
+dist/${CND_CONF}/${IMAGE_TYPE}/mqtt_client.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk ../../../../../../../../../microchip/harmony/v1_08_01/bin/framework/peripheral/PIC32MX795F512L_peripherals.a ../../../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/crypto/aes_pic32mx.a
+ @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
+ ${MP_CC} $(MP_EXTRA_LD_PRE) -mdebugger -D__MPLAB_DEBUGGER_PK3=1 -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/mqtt_client.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} ../../../../../../../../../microchip/harmony/v1_08_01/bin/framework/peripheral/PIC32MX795F512L_peripherals.a ../../../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/crypto/aes_pic32mx.a -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI $(COMPARISON_BUILD) -mreserve=boot@0x1FC02000:0x1FC02FEF -mreserve=boot@0x1FC02000:0x1FC024FF -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_PK3=1,--defsym=_min_heap_size=2048,--gc-sections,--no-code-in-dinit,--no-dinit-in-serial-mem,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml
+
+else
+dist/${CND_CONF}/${IMAGE_TYPE}/mqtt_client.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk ../../../../../../../../../microchip/harmony/v1_08_01/bin/framework/peripheral/PIC32MX795F512L_peripherals.a ../../../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/crypto/aes_pic32mx.a
+ @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
+ ${MP_CC} $(MP_EXTRA_LD_PRE) -mprocessor=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/mqtt_client.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} ../../../../../../../../../microchip/harmony/v1_08_01/bin/framework/peripheral/PIC32MX795F512L_peripherals.a ../../../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/crypto/aes_pic32mx.a -DXPRJ_mx795_CC3100_e16=$(CND_CONF) -no-legacy-libc -DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI $(COMPARISON_BUILD) -Wl,--defsym=__MPLAB_BUILD=1$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=_min_heap_size=2048,--gc-sections,--no-code-in-dinit,--no-dinit-in-serial-mem,-Map="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map",--memorysummary,dist/${CND_CONF}/${IMAGE_TYPE}/memoryfile.xml
+ ${MP_CC_DIR}/xc32-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/mqtt_client.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX}
+endif
+
+
+# Subprojects
+.build-subprojects:
+
+
+# Subprojects
+.clean-subprojects:
+
+# Clean Targets
+.clean-conf: ${CLEAN_SUBPROJECTS}
+ ${RM} -r build/mx795_CC3100_e16
+ ${RM} -r dist/mx795_CC3100_e16
+
+# Enable dependency checking
+.dep.inc: .depcheck-impl
+
+DEPFILES=$(shell "${PATH_TO_IDE_BIN}"mplabwildcard ${POSSIBLE_DEPFILES})
+ifneq (${DEPFILES},)
+include ${DEPFILES}
+endif
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-variables.mk b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-variables.mk
new file mode 100644
index 00000000..45a8fb3a
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Makefile-variables.mk
@@ -0,0 +1,13 @@
+#
+# Generated - do not edit!
+#
+# NOCDDL
+#
+CND_BASEDIR=`pwd`
+# mx795_CC3100_e16 configuration
+CND_ARTIFACT_DIR_mx795_CC3100_e16=dist/mx795_CC3100_e16/production
+CND_ARTIFACT_NAME_mx795_CC3100_e16=mqtt_client.X.production.hex
+CND_ARTIFACT_PATH_mx795_CC3100_e16=dist/mx795_CC3100_e16/production/mqtt_client.X.production.hex
+CND_PACKAGE_DIR_mx795_CC3100_e16=${CND_DISTDIR}/mx795_CC3100_e16/package
+CND_PACKAGE_NAME_mx795_CC3100_e16=mqttclient.x.tar
+CND_PACKAGE_PATH_mx795_CC3100_e16=${CND_DISTDIR}/mx795_CC3100_e16/package/mqttclient.x.tar
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Package-mx795_CC3100_e16.bash b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Package-mx795_CC3100_e16.bash
new file mode 100644
index 00000000..62b5f7e4
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/Package-mx795_CC3100_e16.bash
@@ -0,0 +1,73 @@
+#!/bin/bash -x
+
+#
+# Generated - do not edit!
+#
+
+# Macros
+TOP=`pwd`
+CND_CONF=mx795_CC3100_e16
+CND_DISTDIR=dist
+TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging
+TMPDIRNAME=tmp-packaging
+OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/mqtt_client.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
+OUTPUT_BASENAME=mqtt_client.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
+PACKAGE_TOP_DIR=mqttclient.x/
+
+# Functions
+function checkReturnCode
+{
+ rc=$?
+ if [ $rc != 0 ]
+ then
+ exit $rc
+ fi
+}
+function makeDirectory
+# $1 directory path
+# $2 permission (optional)
+{
+ mkdir -p "$1"
+ checkReturnCode
+ if [ "$2" != "" ]
+ then
+ chmod $2 "$1"
+ checkReturnCode
+ fi
+}
+function copyFileToTmpDir
+# $1 from-file path
+# $2 to-file path
+# $3 permission
+{
+ cp "$1" "$2"
+ checkReturnCode
+ if [ "$3" != "" ]
+ then
+ chmod $3 "$2"
+ checkReturnCode
+ fi
+}
+
+# Setup
+cd "${TOP}"
+mkdir -p ${CND_DISTDIR}/${CND_CONF}/package
+rm -rf ${TMPDIR}
+mkdir -p ${TMPDIR}
+
+# Copy files and create directories and links
+cd "${TOP}"
+makeDirectory ${TMPDIR}/mqttclient.x/bin
+copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
+
+
+# Generate tar file
+cd "${TOP}"
+rm -f ${CND_DISTDIR}/${CND_CONF}/package/mqttclient.x.tar
+cd ${TMPDIR}
+tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/mqttclient.x.tar *
+checkReturnCode
+
+# Cleanup
+cd "${TOP}"
+rm -rf ${TMPDIR}
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/configurations.xml b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/configurations.xml
new file mode 100644
index 00000000..2ddbef55
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/configurations.xml
@@ -0,0 +1,489 @@
+
+
+
+
+
+
+
+
+
+
+ ../src/system_config/mx795_CC3100_e16/framework/driver/rtcc/drv_rtcc_static.h
+
+
+
+
+ ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_local.h
+ ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.h
+
+ ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/drv_spi_static.h
+
+
+
+
+ ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_local.h
+
+ ../src/system_config/mx795_CC3100_e16/framework/driver/usart/drv_usart_static.h
+
+
+
+
+ ../src/system_config/mx795_CC3100_e16/framework/system/clk/sys_clk_static.h
+
+
+
+ ../src/system_config/mx795_CC3100_e16/system_config.h
+ ../src/system_config/mx795_CC3100_e16/system_definitions.h
+
+
+ ../src/app.h
+ ../src/user_params.h
+
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/driver/driver.h
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/driver/driver_common.h
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/gfx/gfx_palette.h
+
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/osal/src/osal_impl_basic.h
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/osal/src/osal_impl_none.h
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/osal/osal.h
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/osal/osal_definitions.h
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/peripheral/peripheral.h
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/peripheral/peripheral_common.h
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/peripheral/peripheral_common_32bit.h
+
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/clk/sys_clk.h
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/clk/sys_clk_mapping.h
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_common.h
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_module.h
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_buffer.h
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_queue.h
+
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/console/src/sys_console_local.h
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/console/sys_console.h
+
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug_local.h
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/sys_debug.h
+
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_local.h
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/sys_devcon.h
+
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_private.h
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/sys_int.h
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/sys_int_mapping.h
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/ports/sys_ports.h
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/system.h
+
+
+ ../src/user.h
+
+
+
+
+ ../../../../../mongoose.c
+ ../../../../../mongoose.h
+
+
+
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/trace.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/device.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/socket.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/fs.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/netcfg.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/netapp.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/simplelink.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/wlan_rx_filters.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/wlan.h
+
+
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netcfg.c
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/device.c
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/driver.c
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/protocol.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/nonos.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/objInclusion.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/fs.c
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/wlan.c
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/driver.h
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/socket.c
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netapp.c
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/nonos.c
+
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/template_user.h
+
+
+
+
+
+
+
+
+
+ ../src/system_config/mx795_CC3100_e16/framework/driver/rtcc/src/drv_rtcc_static.c
+
+
+
+
+
+ ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static.c
+ ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_mapping.c
+ ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_tasks.c
+ ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.c
+ ../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_rm_tasks.c
+
+
+
+
+
+ ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_mapping.c
+ ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static.c
+ ../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_byte_model.c
+
+
+
+
+
+
+ ../src/system_config/mx795_CC3100_e16/framework/system/clk/src/sys_clk_static.c
+
+
+
+
+ ../src/system_config/mx795_CC3100_e16/framework/system/console/src/sys_console_static.c
+
+
+
+
+ ../src/system_config/mx795_CC3100_e16/framework/system/ports/src/sys_ports_static.c
+
+
+
+
+ ../src/system_config/mx795_CC3100_e16/system_init.c
+ ../src/system_config/mx795_CC3100_e16/system_interrupt.c
+ ../src/system_config/mx795_CC3100_e16/system_exceptions.c
+ ../src/system_config/mx795_CC3100_e16/system_tasks.c
+
+
+ ../src/app.c
+ ../src/main.c
+ ../src/cc3100_port.c
+
+
+
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug.c
+
+
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon.c
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_pic32mx.c
+
+
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_pic32.c
+
+
+
+
+
+
+ Makefile
+
+
+
+ ../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink
+ ../../../../../../../go/src/cesanta.com/mongoose
+ ../../../../../../../microchip/harmony/v1_08_01
+ ../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink
+ ../../../../..
+
+ Makefile
+
+
+
+ localhost
+ PIC32MX795F512L
+
+
+ PKOBSKDEPlatformTool
+ XC32
+ 1.42
+ 2
+
+
+
+
+ ../../../../../../../../../microchip/harmony/v1_08_01/bin/framework/peripheral/PIC32MX795F512L_peripherals.a
+ ../../../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/crypto/aes_pic32mx.a
+
+
+
+
+
+ false
+ false
+
+
+
+
+ false
+
+ false
+
+ false
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/private/SuppressibleMessageMemo.properties b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/private/SuppressibleMessageMemo.properties
new file mode 100644
index 00000000..f1299a50
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/private/SuppressibleMessageMemo.properties
@@ -0,0 +1,3 @@
+#
+#Thu Sep 29 17:49:40 EEST 2016
+pkobskde/DEVID_MISMATCH=true
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/private/configurations.xml b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/private/configurations.xml
new file mode 100644
index 00000000..585feff6
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/private/configurations.xml
@@ -0,0 +1,25 @@
+
+
+ Makefile
+ 0
+
+
+ :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>8107:=<rev>0002:=<man>Microchip Technology Incorporated:=<prod>Explorer 16/32 PICkit on Board:=<sn>BUR162971352:=<drv>x:=<xpt>h:=end
+ /opt/microchip/xc32/v1.42/bin
+
+ place holder 1
+ place holder 2
+
+
+
+
+ true
+ 0
+ 0
+ 0
+
+
+
+
+
+
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/private/private.xml b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/private/private.xml
new file mode 100644
index 00000000..c696e23e
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/private/private.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+ file:/home/alex/microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon.c
+ file:/home/alex/microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug.c
+ file:/home/alex/microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_pic32mx.c
+ file:/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/spawn.c
+ file:/home/alex/microchip/harmony/v1_08_01/framework/system/int/src/sys_int_pic32.c
+
+
+
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/project.properties b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/project.properties
new file mode 100644
index 00000000..e69de29b
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/project.xml b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/project.xml
new file mode 100644
index 00000000..1db8b2d6
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.X/nbproject/project.xml
@@ -0,0 +1,18 @@
+
+
+ com.microchip.mplab.nbide.embedded.makeproject
+
+
+
+ mqtt_client
+ e54023e9-3948-44ef-bf6f-29d8b223e555
+ 0
+ c
+
+ h
+
+ ISO-8859-1
+
+
+
+
diff --git a/examples/PIC32/mqtt_client/firmware/mqtt_client.hconfig b/examples/PIC32/mqtt_client/firmware/mqtt_client.hconfig
new file mode 100644
index 00000000..a49ccec0
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/mqtt_client.hconfig
@@ -0,0 +1,60 @@
+#
+# Application configuration file generated by
+# Microchip Harmony Configurator (MHC) from Harmony version: 1.04
+#
+
+mainmenu "MPLAB Harmony & Application Configuration"
+
+menu "Application Configuration"
+
+config APP_INSTANCES
+ int "Number of Applications"
+ default 1
+ range 1 10 # Must limit to 10 or application templates will need to be updated.
+
+config APP_AUTO_GENERATE_CODE # Used by MHC internally to selectively auto-generate app.h, app.c, and main.c
+ bool
+ default n
+
+source "$HARMONY_VERSION_PATH/utilities/mhc/config/gencode/framework/global_event/config/global_event_gencode.hconfig"
+source "$HARMONY_VERSION_PATH/utilities/mhc/config/app_name_idx_gencode.ftl" 10 instances
+
+menu "Exception Handling"
+
+config USE_EXCEPTION_HANDLER
+ bool "Use MPLAB Harmony Exception Handler Template?"
+ default y
+ ---help---
+ Enter 'Y' if you want to include an exception handler template
+ (system_exceptions.c) in this system configuration. Enter 'N' if
+ you do not.
+ ---endhelp---
+
+config EXCEPTION_USE_SYS_DEBUG
+ bool "Use debug services in exception handler?"
+ depends on USE_EXCEPTION_HANDLER
+ default y
+ ---help---
+ Enter 'Y' if you want the exception handler to use the SYS_DEBUG service to
+ report exception information. Enter 'N' if you do not.
+ ---endhelp---
+
+config EXCEPTION_BREAKPOINT
+ bool "Hit breakpoint when an exception occurs?"
+ depends on USE_EXCEPTION_HANDLER && EXCEPTION_USE_SYS_DEBUG
+ default y
+ ---help---
+ Enter 'Y' if you want the exception handler to hit a breakpoint when
+ an exception occurs. Enter 'N' if you do not.
+ Note: Only works if debugging is enabled.
+ ---endhelp---
+
+endmenu # Exception Handling
+
+#insert application specific configuration here
+
+endmenu # Application Configuration
+
+source "$HARMONY_VERSION_PATH/config/harmony.hconfig"
+
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/app.c b/examples/PIC32/mqtt_client/firmware/src/app.c
new file mode 100644
index 00000000..a58c5b3d
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/app.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2016 Cesanta Software Limited
+ * All rights reserved
+ */
+
+#include "app.h"
+#include "system/debug/sys_debug.h"
+#include "./../../../../../mongoose.h"
+#include "user_params.h"
+
+static struct mg_mgr mgr;
+static int msg_id;
+struct mg_mqtt_topic_expression topic_expressions[] = {{"/test", 0}};
+
+APP_DATA appData;
+
+void APP_Initialize(void) {
+ appData.state = APP_STATE_INIT;
+ DRV_RTCC_Start();
+ mg_mgr_init(&mgr, NULL);
+}
+
+static void ev_handler(struct mg_connection *nc, int ev, void *p);
+
+void APP_Tasks(void) {
+ /*
+ * Processing CC3100 Tasks
+ * It looks like SYS task and might be processed in SYS_Tasks
+ * But for this demo it is here to make this call
+ * visible
+ */
+ _SlNonOsMainLoopTask();
+
+ /* Check the application's current state. */
+ switch (appData.state) {
+ /* Application's initial state. */
+ case APP_STATE_INIT: {
+ SYS_PRINT("\n\r*** PIC32 MQTT CLIENT ***\n\r");
+
+ SYS_PRINT("\n\rInitializing CC3100\n\r");
+ int res = sl_Start(NULL, NULL, NULL);
+ if (res != 0) {
+ SYS_PRINT("FAILED\n\r");
+ appData.state = APP_STATE_DONE;
+ break;
+ }
+
+ SlSecParams_t sec_params;
+ memset(&sec_params, 0, sizeof(sec_params));
+ sec_params.Key = NET_PWD;
+ sec_params.KeyLen = sizeof(NET_PWD) - 1;
+ sec_params.Type = NET_SECURITY;
+
+ SYS_PRINT("Connecting to WiFi\n\r");
+
+ sl_WlanConnect(NET_SSID, sizeof(NET_SSID) - 1, 0, &sec_params, NULL);
+
+ SYS_PRINT("Initialization done\n\r");
+
+ appData.state = APP_STATE_SERVICE_TASKS;
+
+ break;
+ }
+
+ case APP_STATE_CONNECT_BROKER: {
+ if (mg_connect(&mgr, MQTT_BROKER_ADDRESS, ev_handler) == NULL) {
+ SYS_PRINT("Failed to create connection\n\r");
+ appData.state = APP_STATE_DONE;
+ } else {
+ appData.state = APP_STATE_SERVICE_TASKS;
+ }
+ break;
+ }
+ case APP_STATE_SERVICE_TASKS: {
+ static uint32_t prev_poll_time = 0;
+ uint32_t now = DRV_RTCC_TimeGet();
+ if (now - prev_poll_time > 100) {
+ /*
+ * We cannot call mg_mgr_poll every cycle
+ * it leads to SPI overload (internaly mg_mgr_poll calls
+ * CC3100 via SPI
+ */
+ mg_mgr_poll(&mgr, 1);
+ prev_poll_time = now;
+ }
+ break;
+ }
+
+ case APP_STATE_DONE: {
+ /* Do nothing here */
+ break;
+ }
+ default: {
+ /* TODO: Handle error in application's state machine. */
+ break;
+ }
+ }
+}
+
+void SimpleLinkWlanEventHandler(SlWlanEvent_t *pWlanEvent) {
+ switch (pWlanEvent->Event) {
+ case SL_WLAN_CONNECT_EVENT:
+ SYS_PRINT("Connected to WiFi\r\n");
+ break;
+ case SL_WLAN_DISCONNECT_EVENT:
+ SYS_PRINT("Disconnected WiFi\r\n");
+ break;
+ default:
+ SYS_PRINT("Got Wlan event %d\r\n", pWlanEvent->Event);
+ break;
+ }
+}
+
+void SimpleLinkNetAppEventHandler(SlNetAppEvent_t *pNetAppEvent) {
+ switch (pNetAppEvent->Event) {
+ case SL_NETAPP_IPV4_IPACQUIRED_EVENT:
+ SYS_PRINT("Got IP\r\n");
+ appData.state = APP_STATE_CONNECT_BROKER;
+ break;
+ default:
+ SYS_PRINT("Got NetApp Event: %d\r\n", pNetAppEvent->Event);
+ break;
+ }
+}
+
+static void ev_handler(struct mg_connection *nc, int ev, void *p) {
+ struct mg_mqtt_message *msg = (struct mg_mqtt_message *) p;
+ static int count1 = 0;
+ switch (ev) {
+ case MG_EV_CONNECT:
+ if (*(int *) p != 0) {
+ SYS_PRINT("Failed to connect to %s\r\n", MQTT_BROKER_ADDRESS);
+ } else {
+ SYS_PRINT("Connected to %s\r\n", MQTT_BROKER_ADDRESS);
+ }
+ struct mg_send_mqtt_handshake_opts opts;
+ memset(&opts, 0, sizeof(opts));
+ opts.user_name = MQTT_USER_NAME;
+ opts.password = MQTT_USER_PWD;
+ mg_set_protocol_mqtt(nc);
+ mg_send_mqtt_handshake_opt(nc, "PIC32", opts);
+ break;
+ case MG_EV_MQTT_CONNACK:
+ if (msg->connack_ret_code != MG_EV_MQTT_CONNACK_ACCEPTED) {
+ SYS_PRINT("Got mqtt connection error %d\n\r", msg->connack_ret_code);
+ } else {
+ SYS_PRINT("Connected to broker\n\r");
+ }
+ SYS_PRINT("Subscribing to /test\n\r");
+ mg_mqtt_subscribe(nc, topic_expressions,
+ sizeof(topic_expressions) / sizeof(*topic_expressions),
+ ++msg_id);
+ nc->flags |= MG_F_USER_1;
+ break;
+ case MG_EV_MQTT_SUBACK:
+ SYS_PRINT("Subscription acknowledged\r\n");
+ break;
+ case MG_EV_MQTT_PUBLISH:
+ SYS_PRINT("Got incoming message %s: %.*s\r\n", msg->topic,
+ (int) msg->payload.len, msg->payload.p);
+ break;
+ case MG_EV_POLL: {
+ if (nc->flags & MG_F_USER_1) {
+ char msg[100];
+ static uint32_t prev_send = 0;
+ uint32_t now = DRV_RTCC_TimeGet();
+ if (now - prev_send > 1000) {
+ int len = snprintf(msg, sizeof(msg), "Current RTC value: %u", now);
+ SYS_PRINT("Publishing message with RTC value=%u\r\n", now);
+ mg_mqtt_publish(nc, "/stuff", ++msg_id, MG_MQTT_QOS(0), msg, len);
+ prev_send = now;
+ }
+ }
+ break;
+ }
+ case MG_EV_CLOSE:
+ SYS_PRINT("Connection to broker is closed\r\n");
+ appData.state = APP_STATE_DONE;
+ break;
+ default:
+ break;
+ }
+}
diff --git a/examples/PIC32/mqtt_client/firmware/src/app.h b/examples/PIC32/mqtt_client/firmware/src/app.h
new file mode 100644
index 00000000..62bd565b
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/app.h
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2016 Cesanta Software Limited
+ * All rights reserved
+ */
+
+#ifndef _APP_H
+#define _APP_H
+
+#include
+#include
+#include
+#include
+#include "system_config.h"
+#include "system_definitions.h"
+#include "simplelink.h"
+
+#ifdef __cplusplus
+
+extern "C" {
+
+#endif
+/* Application states
+
+ Summary:
+ Application states enumeration
+
+ Description:
+ This enumeration defines the valid application states. These states
+ determine the behavior of the application at various times.
+*/
+
+typedef enum {
+ APP_STATE_INIT = 0,
+ APP_STATE_SERVICE_TASKS,
+ APP_STATE_CONNECT_BROKER,
+ APP_STATE_DONE
+} APP_STATES;
+
+// *****************************************************************************
+/* Application Data
+
+ Summary:
+ Holds application data
+
+ Description:
+ This structure holds the application's data.
+
+ Remarks:
+ Application strings and buffers are be defined outside this structure.
+ */
+
+typedef struct {
+ /* The application's current state */
+ APP_STATES state;
+} APP_DATA;
+
+/*******************************************************************************
+ Function:
+ void APP_Initialize ( void )
+
+ Summary:
+ MPLAB Harmony application initialization routine.
+
+ Description:
+ This function initializes the Harmony application. It places the
+ application in its initial state and prepares it to run so that its
+ APP_Tasks function can be called.
+
+ Precondition:
+ All other system initialization routines should be called before calling
+ this routine (in "SYS_Initialize").
+
+ Parameters:
+ None.
+
+ Returns:
+ None.
+
+ Example:
+
+ APP_Initialize();
+
+
+ Remarks:
+ This routine must be called from the SYS_Initialize function.
+*/
+
+void APP_Initialize(void);
+
+/*******************************************************************************
+ Function:
+ void APP_Tasks ( void )
+
+ Summary:
+ MPLAB Harmony Demo application tasks function
+
+ Description:
+ This routine is the Harmony Demo application's tasks function. It
+ defines the application's state machine and core logic.
+
+ Precondition:
+ The system and application initialization ("SYS_Initialize") should be
+ called before calling this.
+
+ Parameters:
+ None.
+
+ Returns:
+ None.
+
+ Example:
+
+ APP_Tasks();
+
+
+ Remarks:
+ This routine must be called from SYS_Tasks() routine.
+ */
+
+void APP_Tasks(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _APP_H */
diff --git a/examples/PIC32/mqtt_client/firmware/src/cc3100_port.c b/examples/PIC32/mqtt_client/firmware/src/cc3100_port.c
new file mode 100644
index 00000000..2047808d
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/cc3100_port.c
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2016 Cesanta Software Limited
+ * All rights reserved
+ */
+
+#include "app.h"
+#include "system/debug/sys_debug.h"
+#include "simplelink.h"
+#include "user_params.h"
+
+P_EVENT_HANDLER g_cc3100_IRQ_handler = NULL;
+
+void AssertCS() {
+ PLIB_PORTS_PinClear(PORTS_ID_0, CS_PORT, CS_PIN);
+}
+
+void DeassertCS() {
+ PLIB_PORTS_PinSet(PORTS_ID_0, CS_PORT, CS_PIN);
+}
+
+void CC3100_enable() {
+ PLIB_PORTS_PinSet(PORTS_ID_0, HIB_PORT, HIB_PIN);
+}
+
+void CC3100_disable() {
+ PLIB_PORTS_PinClear(PORTS_ID_0, HIB_PORT, HIB_PIN);
+}
+
+Fd_t spi_Open(char *ifName, unsigned long flags) {
+ CC3100_disable();
+
+ return 0;
+}
+
+int spi_Write(Fd_t fd, unsigned char *pBuff, int len) {
+ if (len > 512) {
+ SYS_PRINT("BUFFER TOO SMALL");
+ return 0;
+ }
+
+ AssertCS();
+ uint8_t dummy[512];
+ DRV_SPI0_BufferAddWriteRead(pBuff, dummy, len);
+ DRV_SPI_Tasks(sysObj.spiObjectIdx0);
+ DeassertCS();
+
+ return len;
+}
+
+int spi_Read(Fd_t fd, unsigned char *pBuff, int len) {
+ if (len > 512) {
+ SYS_PRINT("BUFFER TOO SMALL");
+ return 0;
+ }
+ uint8_t dummy[512];
+ memset(dummy, 0xFF, len);
+ AssertCS();
+ DRV_SPI0_BufferAddWriteRead(dummy, pBuff, len);
+ DRV_SPI_Tasks(sysObj.spiObjectIdx0);
+ DeassertCS();
+ return len;
+}
+
+int registerInterruptHandler(P_EVENT_HANDLER int_handler, void *pValue) {
+ (void) pValue;
+ g_cc3100_IRQ_handler = int_handler;
+}
diff --git a/examples/PIC32/mqtt_client/firmware/src/main.c b/examples/PIC32/mqtt_client/firmware/src/main.c
new file mode 100644
index 00000000..8f0135eb
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/main.c
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2016 Cesanta Software Limited
+ * All rights reserved
+ */
+
+#include
+#include
+#include "system/common/sys_module.h"
+
+int main(void) {
+ /* Initialize all MPLAB Harmony modules, including application(s). */
+ SYS_Initialize(NULL);
+
+ while (1) {
+ /* Maintain state machines of all polled MPLAB Harmony modules. */
+ SYS_Tasks();
+ }
+
+ /* Execution should not come here during normal operation */
+
+ return (EXIT_FAILURE);
+}
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/configuration.xml b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/configuration.xml
new file mode 100644
index 00000000..c5878ea4
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/configuration.xml
@@ -0,0 +1,328 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 100
+ 0,0
+ 3
+
+ FFFFFF
+ 404040
+ C0C0C0
+ 000000
+ C0C0C0
+ 404040
+ 000000
+ FFFFFF
+ 404040
+ 000000
+ FFFFFF
+
+ Color
+ None
+
+
+
+
+
+
+
+
+
+
+
+
+ osal_impl_basic.h
+ Header Files/framework/osal/src
+
+
+ peripheral_common_32bit.h
+ Header Files/framework/peripheral
+
+
+ driver_common.h
+ Header Files/framework/driver
+
+
+ sys_devcon.c
+ Source Files/framework/system/devcon/src
+
+
+ osal.h
+ Header Files/framework/osal
+
+
+ sys_ports.h
+ Header Files/framework/system/ports
+
+
+ driver.h
+ Header Files/framework/driver
+
+
+ peripheral_common.h
+ Header Files/framework/peripheral
+
+
+ sys_debug_local.h
+ Header Files/framework/system/debug/src
+
+
+ sys_common.h
+ Header Files/framework/system/common
+
+
+ sys_buffer.h
+ Header Files/framework/system/common
+
+
+ sys_int_pic32.c
+ Source Files/framework/system/int/src
+
+
+ sys_clk.h
+ Header Files/framework/system/clk
+
+
+ osal_impl_none.h
+ Header Files/framework/osal/src
+
+
+ sys_clk_mapping.h
+ Header Files/framework/system/clk
+
+
+ osal_definitions.h
+ Header Files/framework/osal
+
+
+ sys_int_mapping.h
+ Header Files/framework/system/int
+
+
+ gfx_palette.h
+ Header Files/framework/gfx
+
+
+ sys_int_private.h
+ Header Files/framework/system/int/src
+
+
+ sys_devcon.h
+ Header Files/framework/system/devcon
+
+
+ system.h
+ Header Files/framework/system
+
+
+ sys_debug.c
+ Source Files/framework/system/debug/src
+
+
+ sys_console.h
+ Header Files/framework/system/console
+
+
+ sys_debug.h
+ Header Files/framework/system/debug
+
+
+ sys_module.h
+ Header Files/framework/system/common
+
+
+ sys_devcon_pic32mx.c
+ Source Files/framework/system/devcon/src
+
+
+ sys_devcon_local.h
+ Header Files/framework/system/devcon/src
+
+
+ peripheral.h
+ Header Files/framework/peripheral
+
+
+ sys_queue.h
+ Header Files/framework/system/common
+
+
+ sys_console_local.h
+ Header Files/framework/system/console/src
+
+
+ sys_int.h
+ Header Files/framework/system/int
+
+
+
+
+ sys_console_static.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/system/console/src
+ 0B506F1F6112899EF538390AD8DBD62F
+
+
+ system_definitions.h
+ Header Files/app/system_config/mx795_CC3100_e16
+ 1F863F474CF6B1EF5BCAEC53DA0A1EB9
+
+
+ system_exceptions.c
+ Source Files/app/system_config/mx795_CC3100_e16
+ C111969CA43D6CEA1E9E33A6164E7AE0
+
+
+ drv_spi_static_local.h
+ Header Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src
+ 70055803006A2C67E983956B3B3ABD25
+
+
+ drv_spi_mapping.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src
+ ADEEE2519E932B46D44C41B8F44E1F19
+
+
+ drv_usart_static_byte_model.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/driver/usart/src
+ F91C429976AC25EB8B3639F0B0356E3B
+
+
+ system_init.c
+ Source Files/app/system_config/mx795_CC3100_e16
+ 34219E31193F143A502765E488BC500E
+ 368F06F4DCF995EE27BD5F31F9034D30
+
+
+ drv_usart_static.h
+ Header Files/app/system_config/mx795_CC3100_e16/framework/driver/usart
+ AE37BD63B6EC9F6ADD6B8006CE192FCB
+
+
+ drv_spi_static_tasks.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src
+ 8D9BDD4F87493B036E9786F53F65EE82
+
+
+ drv_spi_static.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src
+ C0323F1E5F9550BF1BC4441ADB9B09D8
+
+
+ drv_rtcc_static.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/driver/rtcc/src
+ 9A5D97DC0EADF32162B4B222AAC95408
+
+
+ sys_clk_static.h
+ Header Files/app/system_config/mx795_CC3100_e16/framework/system/clk
+ B4BD59D8D7C4DA95DC5E3B57755FD352
+
+
+ system_config.h
+ Header Files/app/system_config/mx795_CC3100_e16
+ 85CDEB06EBF7053ADCB2CB37014D10D1
+
+
+ drv_usart_static_local.h
+ Header Files/app/system_config/mx795_CC3100_e16/framework/driver/usart/src
+ 62F7F49D6A443F111DA38971475472FD
+
+
+ system_interrupt.c
+ Source Files/app/system_config/mx795_CC3100_e16
+ CACF8AB870174547FD1DC4FE62DECBAD
+ DB1F2DBEF12282D8AF55C36D1192E873
+
+
+ sys_clk_static.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/system/clk/src
+ E8C935BED4628875A8C3428DDD07355C
+
+
+ drv_spi_static.h
+ Header Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static
+ 68B5BA023AB90B18D229B6E7CBF0850C
+
+
+ drv_usart_mapping.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/driver/usart/src
+ 115DDE4372E58D4116BC77DC36FD97DC
+
+
+ main.c
+ Source Files/app
+
+
+ drv_spi_static_sys_queue.h
+ Header Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src
+ 3D489FB0B5415BB6F80FA34FC0CEE9F7
+
+
+ drv_spi_static_rm_tasks.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src
+ BED98A3F5628502709D95341DC70019B
+
+
+ app.c
+ Source Files/app
+
+
+ sys_ports_static.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/system/ports/src
+ F693DCC21C702581B107B8A238195A13
+
+
+ drv_spi_static_sys_queue.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src
+ E06222D2E5F5F69EE3C77ACD6FCC3059
+
+
+ system_tasks.c
+ Source Files/app/system_config/mx795_CC3100_e16
+ 9990FEA6D9BDD86EAA2B873D5A5B9DAC
+ 91547DE270F61E54B606034EBF1BAEC1
+
+
+ app.h
+ Header Files/app
+
+
+ drv_rtcc_static.h
+ Header Files/app/system_config/mx795_CC3100_e16/framework/driver/rtcc
+ FED59BF02817E49C245011170B963EE2
+
+
+ drv_usart_static.c
+ Source Files/app/system_config/mx795_CC3100_e16/framework/driver/usart/src
+ BD4DEFD647BB5AF32D1DBF352D6139D5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/rtcc/drv_rtcc_static.h b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/rtcc/drv_rtcc_static.h
new file mode 100644
index 00000000..e4f08eb6
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/rtcc/drv_rtcc_static.h
@@ -0,0 +1,77 @@
+/* clang-format off */
+/*******************************************************************************
+ RTCC Driver Interface Declarations for Static Single Instance Driver
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_rtcc_static.h
+
+ Summary:
+ RTCC driver interface declarations for the static single instance driver.
+
+ Description:
+ The RTCC device driver provides a simple interface to manage the RTCC
+ modules on Microchip microcontrollers. This file defines the interface
+ Declarations for the OC driver.
+
+ Remarks:
+ Static interfaces incorporate the driver instance number within the names
+ of the routines, eliminating the need for an object ID or object handle.
+ Static single-open interfaces also eliminate the need for the open handle.
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2013 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTOCULAR PURPOSE.
+IN NO EVENT SHALL MOCROCHIP OR ITS LOCENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STROCT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVOCES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+#ifndef _DRV_RTCC_STATIC_H
+#define _DRV_RTCC_STATIC_H
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Interface Headers for RTCC Instance
+// *****************************************************************************
+// *****************************************************************************
+void DRV_RTCC_Initialize(void);
+
+void DRV_RTCC_Start(void);
+
+void DRV_RTCC_Stop(void);
+
+void DRV_RTCC_ClockOutput(void);
+
+uint32_t DRV_RTCC_TimeGet(void);
+
+uint32_t DRV_RTCC_DateGet(void);
+
+uint32_t DRV_RTCC_AlarmTimeGet(void);
+
+uint32_t DRV_RTCC_AlarmDateGet(void);
+
+#endif // #ifndef _DRV_RTCC_STATIC_H
+/*******************************************************************************
+ End of File
+*/
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/rtcc/src/drv_rtcc_static.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/rtcc/src/drv_rtcc_static.c
new file mode 100644
index 00000000..18a2020c
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/rtcc/src/drv_rtcc_static.c
@@ -0,0 +1,101 @@
+/*******************************************************************************
+ RTCC Driver Initialization File
+
+ File Name:
+ drv_rtcc_static.c
+
+ Summary:
+ This file contains source code necessary to initialize the RTCC driver.
+
+ Description:
+ RTCC Driver includes initialization and other routines with small footprtint.
+ *******************************************************************************/
+
+// DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2013-2014 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+ *******************************************************************************/
+// DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Header Includes
+// *****************************************************************************
+// *****************************************************************************
+#include "peripheral/rtcc/plib_rtcc.h"
+#include "peripheral/devcon/plib_devcon.h"
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: RTCC static driver functions
+// *****************************************************************************
+// *****************************************************************************
+void DRV_RTCC_Initialize(void) {
+ PLIB_DEVCON_SystemUnlock(DEVCON_ID_0); /* Unlock System */
+
+ /* Initialize RTCC */
+ PLIB_RTCC_WriteEnable(RTCC_ID_0); /* Enable writes to RTCC */
+ PLIB_RTCC_Disable(RTCC_ID_0); /* Disable clock to RTCC */
+ while (PLIB_RTCC_ClockRunningStatus(RTCC_ID_0))
+ ; /*Check if clock is disabled */
+ PLIB_RTCC_RTCTimeSet(RTCC_ID_0, 0x23595900); /* Set RTCC time */
+ PLIB_RTCC_RTCDateSet(RTCC_ID_0, 0x14010100); /* Set RTCC date */
+ PLIB_RTCC_AlarmDisable(RTCC_ID_0); /* Disable alarm */
+ while (PLIB_RTCC_AlarmSyncStatusGet(RTCC_ID_0))
+ ; /* Wait for disable */
+ PLIB_RTCC_AlarmTimeSet(RTCC_ID_0, 0x00000500); /* Set RTCC alarm time */
+ PLIB_RTCC_AlarmDateSet(RTCC_ID_0, 0x00010100); /* Set RTCC alarm date */
+ PLIB_RTCC_AlarmMaskModeSelect(
+ RTCC_ID_0, RTCC_ALARM_EVERY_SECOND); /* Set RTCC alarm mode */
+}
+
+void DRV_RTCC_Start(void) {
+ PLIB_RTCC_Enable(RTCC_ID_0);
+}
+
+void DRV_RTCC_Stop(void) {
+ PLIB_RTCC_Disable(RTCC_ID_0);
+}
+
+void DRV_RTCC_ClockOutput(void) {
+ PLIB_RTCC_ClockOutputEnable(RTCC_ID_0);
+}
+
+uint32_t DRV_RTCC_TimeGet(void) {
+ return PLIB_RTCC_RTCTimeGet(RTCC_ID_0);
+}
+
+uint32_t DRV_RTCC_DateGet(void) {
+ return PLIB_RTCC_RTCDateGet(RTCC_ID_0);
+}
+
+uint32_t DRV_RTCC_AlarmTimeGet(void) {
+ return PLIB_RTCC_AlarmTimeGet(RTCC_ID_0);
+}
+
+uint32_t DRV_RTCC_AlarmDateGet(void) {
+ return PLIB_RTCC_AlarmDateGet(RTCC_ID_0);
+}
+
+/*******************************************************************************
+ End of File
+*/
\ No newline at end of file
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/drv_spi_static.h b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/drv_spi_static.h
new file mode 100644
index 00000000..a1077162
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/drv_spi_static.h
@@ -0,0 +1,137 @@
+/* clang-format off */
+/*******************************************************************************
+ SPI Driver Interface Declarations for Static Single Instance Driver
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_spi_static.h
+
+ Summary:
+ SPI driver interface declarations for the static single instance driver.
+
+ Description:
+ The SPI device driver provides a simple interface to manage the SPI
+ modules on Microchip microcontrollers. This file defines the interface
+ Declarations for the SPI static driver.
+
+ Remarks:
+ Static interfaces incorporate the driver instance number within the names
+ of the routines, eliminating the need for an object ID or object handle.
+
+ Static single-open interfaces also eliminate the need for the open handle.
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+#ifndef _DRV_SPI_STATIC_H
+#define _DRV_SPI_STATIC_H
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+
+#include "driver/spi/static/src/drv_spi_static_local.h"
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus // Provide C++ Compatibility
+
+ extern "C" {
+
+#endif
+// DOM-IGNORE-END
+
+// *********************************************************************************************
+// *********************************************************************************************
+// Section: System Interface Headers for the Instance 0 of SPI static driver
+// *********************************************************************************************
+// *********************************************************************************************
+
+SYS_MODULE_OBJ DRV_SPI0_Initialize( void );
+void DRV_SPI0_Deinitialize ( void );
+SYS_STATUS DRV_SPI0_Status ( void );
+void DRV_SPI0_Tasks ( void );
+
+// *********************************************************************************************
+// *********************************************************************************************
+// Section: General Client Interface Headers for the Instance 0 of SPI static driver
+// *********************************************************************************************
+// *********************************************************************************************
+
+DRV_HANDLE DRV_SPI0_Open ( const SYS_MODULE_INDEX drvIndex, const DRV_IO_INTENT ioIntent );
+void DRV_SPI0_Close ( void );
+int32_t DRV_SPI0_ClientConfigure ( const DRV_SPI_CLIENT_DATA * cfgData );
+
+// *********************************************************************************************
+// *********************************************************************************************
+// Section: Read & Write Client Interface Headers for the Instance 0 of SPI static driver
+// *********************************************************************************************
+// *********************************************************************************************
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI0_BufferAddRead ( void *rxBuffer, size_t size, DRV_SPI_BUFFER_EVENT_HANDLER completeCB, void * context);
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI0_BufferAddWrite ( void *txBuffer, size_t size, DRV_SPI_BUFFER_EVENT_HANDLER completeCB, void * context );
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI0_BufferAddRead2 ( void *rxBuffer, size_t size, DRV_SPI_BUFFER_EVENT_HANDLER completeCB, void * context, DRV_SPI_BUFFER_HANDLE * jobHandle);
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI0_BufferAddWrite2 ( void *txBuffer, size_t size, DRV_SPI_BUFFER_EVENT_HANDLER completeCB, void * context, DRV_SPI_BUFFER_HANDLE * jobHandle );
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI0_BufferAddWriteRead2 ( void *txBuffer, size_t txSize,void *rxBuffer, size_t rxSize, DRV_SPI_BUFFER_EVENT_HANDLER completeCB, void * context, DRV_SPI_BUFFER_HANDLE * jobHandle);
+
+DRV_SPI_BUFFER_EVENT DRV_SPI0_BufferStatus ( DRV_SPI_BUFFER_HANDLE bufferHandle );
+
+/* This API name was present in the old static driver which is maintained for compatibility.
+ So, giving a new name for the new static driver which is taken care of while mapping */
+#define DRV_SPI0_BufferAddWriteReadNew(txbuff, txsize, rxbuff, rxsize, cb, ct ) \
+ DRV_SPI0_BufferAddWriteRead2((txbuff), (txsize), (rxbuff), (rxsize), (cb), (ct), NULL)
+
+
+
+// *********************************************************************************************
+// *********************************************************************************************
+// Section: Old static driver compatibility APIs, these will be deprecated.
+// *********************************************************************************************
+// *********************************************************************************************
+bool DRV_SPI0_ReceiverBufferIsFull( void );
+bool DRV_SPI0_TransmitterBufferIsFull( void );
+int32_t DRV_SPI0_BufferAddWriteRead(const void * txBuffer, void * rxBuffer, uint32_t size);
+// *********************************************************************************************
+
+
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus
+}
+#endif
+// DOM-IGNORE-END
+
+#endif // #ifndef _DRV_SPI_STATIC_H
+/*******************************************************************************
+ End of File
+*/
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_mapping.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_mapping.c
new file mode 100644
index 00000000..c6f77736
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_mapping.c
@@ -0,0 +1,347 @@
+/* clang-format off */
+/*******************************************************************************
+ SPI Driver Dynamic to Static mapping
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_spi_mapping.c
+
+ Summary:
+ Source code for the SPI driver dynamic APIs to static API mapping.
+
+ Description:
+ This file contains code that maps dynamic APIs to static whenever
+ the static mode of the driver is selected..
+
+ Remarks:
+ Static interfaces incorporate the driver instance number within the names
+ of the routines, eliminating the need for an object ID or object handle.
+
+ Static single-open interfaces also eliminate the need for the open handle.
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+#include "system_config.h"
+#include "system_definitions.h"
+
+
+SYS_MODULE_OBJ DRV_SPI_Initialize(const SYS_MODULE_INDEX index,const SYS_MODULE_INIT * const init)
+{
+ SYS_MODULE_OBJ returnValue;
+
+ switch(index)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ returnValue = DRV_SPI0_Initialize();
+ break;
+ }
+ default:
+ {
+ returnValue = SYS_MODULE_OBJ_INVALID;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+void DRV_SPI_Deinitialize( SYS_MODULE_OBJ object)
+{
+ switch(object)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ DRV_SPI0_Deinitialize();
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+}
+
+SYS_STATUS DRV_SPI_Status( SYS_MODULE_OBJ object)
+{
+ SYS_STATUS returnValue;
+
+ switch(object)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ returnValue = DRV_SPI0_Status();
+ break;
+ }
+ default:
+ {
+ returnValue = SYS_STATUS_ERROR;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+void DRV_SPI_Tasks ( SYS_MODULE_OBJ object )
+{
+ switch(object)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ DRV_SPI0_Tasks();
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+}
+
+
+//client interface
+DRV_HANDLE DRV_SPI_Open( const SYS_MODULE_INDEX index, const DRV_IO_INTENT ioIntent)
+{
+ DRV_HANDLE returnValue;
+
+ switch(index)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ returnValue = DRV_SPI0_Open(index,ioIntent);
+ break;
+ }
+ default:
+ {
+ returnValue = DRV_HANDLE_INVALID;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+void DRV_SPI_Close( const DRV_HANDLE handle)
+{
+ uintptr_t instance;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ DRV_SPI0_Close( );
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+}
+
+int32_t DRV_SPI_ClientConfigure ( DRV_HANDLE handle, const DRV_SPI_CLIENT_DATA * cfgData )
+{
+ uintptr_t instance;
+ int32_t returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ returnValue = DRV_SPI0_ClientConfigure( cfgData );
+ break;
+ }
+ default:
+ {
+ returnValue = (int32_t)DRV_HANDLE_INVALID;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+
+//Read & Write Client Interface
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI_BufferAddRead ( DRV_HANDLE handle,void *rxBuffer,size_t size,DRV_SPI_BUFFER_EVENT_HANDLER completeCB,void * context)
+{
+ uintptr_t instance;
+ DRV_SPI_BUFFER_HANDLE returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ returnValue = DRV_SPI0_BufferAddRead ( rxBuffer, size, completeCB, context);
+ break;
+ }
+ default:
+ {
+ returnValue = DRV_SPI_BUFFER_HANDLE_INVALID;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI_BufferAddWrite ( DRV_HANDLE handle,void *txBuffer,size_t size,DRV_SPI_BUFFER_EVENT_HANDLER completeCB,void * context)
+{
+ uintptr_t instance;
+ DRV_SPI_BUFFER_HANDLE returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ returnValue = DRV_SPI0_BufferAddWrite ( txBuffer, size, completeCB, context);
+ break;
+ }
+ default:
+ {
+ returnValue = DRV_SPI_BUFFER_HANDLE_INVALID;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI_BufferAddWriteRead ( DRV_HANDLE handle, void *txBuffer, size_t txSize,
+ void *rxBuffer, size_t rxSize, DRV_SPI_BUFFER_EVENT_HANDLER completeCB, void * context )
+{
+ uintptr_t instance;
+ DRV_SPI_BUFFER_HANDLE returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ //Mapping to a new static driver's API name.
+ switch(instance)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ returnValue = DRV_SPI0_BufferAddWriteReadNew ( txBuffer, txSize, rxBuffer, rxSize, completeCB, context );
+ break;
+ }
+ default:
+ {
+ returnValue = DRV_SPI_BUFFER_HANDLE_INVALID;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI_BufferAddRead2 ( DRV_HANDLE handle,void *rxBuffer,size_t size,DRV_SPI_BUFFER_EVENT_HANDLER completeCB,void * context, DRV_SPI_BUFFER_HANDLE * jobHandle)
+{
+ uintptr_t instance;
+ DRV_SPI_BUFFER_HANDLE returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ returnValue = DRV_SPI0_BufferAddRead2 ( rxBuffer, size, completeCB, context, jobHandle);
+ break;
+ }
+ default:
+ {
+ returnValue = DRV_SPI_BUFFER_HANDLE_INVALID;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI_BufferAddWrite2 ( DRV_HANDLE handle,void *txBuffer,size_t size,DRV_SPI_BUFFER_EVENT_HANDLER completeCB,void * context, DRV_SPI_BUFFER_HANDLE * jobHandle)
+{
+ uintptr_t instance;
+ DRV_SPI_BUFFER_HANDLE returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ returnValue = DRV_SPI0_BufferAddWrite2 ( txBuffer, size, completeCB, context, jobHandle);
+ break;
+ }
+ default:
+ {
+ returnValue = DRV_SPI_BUFFER_HANDLE_INVALID;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI_BufferAddWriteRead2 ( DRV_HANDLE handle, void *txBuffer, size_t txSize,void *rxBuffer, size_t rxSize,DRV_SPI_BUFFER_EVENT_HANDLER completeCB,void * context, DRV_SPI_BUFFER_HANDLE * jobHandle)
+{
+ uintptr_t instance;
+ DRV_SPI_BUFFER_HANDLE returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_SPI_INDEX_0:
+ {
+ returnValue = DRV_SPI0_BufferAddWriteRead2 ( txBuffer, txSize, rxBuffer, rxSize, completeCB, context, jobHandle);
+ break;
+ }
+ default:
+ {
+ returnValue = DRV_SPI_BUFFER_HANDLE_INVALID;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+DRV_SPI_BUFFER_EVENT DRV_SPI_BufferStatus ( DRV_SPI_BUFFER_HANDLE bufferHandle )
+{
+ //This function is independent of instance or client.
+ return DRV_SPI0_BufferStatus ( bufferHandle);
+}
+
+/*******************************************************************************
+ End of File
+*/
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static.c
new file mode 100644
index 00000000..f892b338
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static.c
@@ -0,0 +1,453 @@
+/* clang-format off */
+/*******************************************************************************
+ SPI Driver Static implementation
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_spi_static.c
+
+ Summary:
+ Source code for the SPI driver static implementation.
+
+ Description:
+ The SPI device driver provides a simple interface to manage the SPI
+ modules on Microchip microcontrollers. This file contains static implementation
+ for the SPI driver.
+
+ Remarks:
+ Static interfaces incorporate the driver instance number within the names
+ of the routines, eliminating the need for an object ID or object handle.
+
+ Static single-open interfaces also eliminate the need for the open handle.
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+
+#include
+#include "system_config.h"
+#include "system_definitions.h"
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Global Data
+// *****************************************************************************
+// *****************************************************************************
+static uint8_t sDrvSPIQueueArea[DRV_SPI_SYS_QUEUE_BUFFER_SIZE(DRV_SPI_INSTANCES_NUMBER, sizeof(DRV_SPI_JOB_OBJECT), DRV_SPI_INSTANCES_NUMBER * DRV_SPI_ELEMENTS_PER_QUEUE)];
+
+/* This is the Queue manager object . */
+static DRV_SPI_SYS_QUEUE_MANAGER_SETUP qmInitData = {
+ sDrvSPIQueueArea,
+ sizeof(sDrvSPIQueueArea),
+ DRV_SPI_INSTANCES_NUMBER,
+ sizeof(DRV_SPI_JOB_OBJECT),
+ DRV_SPI_SYS_QUEUE_Fifo,
+};
+
+/* This is the Queue setup object . */
+static DRV_SPI_SYS_QUEUE_SETUP qInitData =
+{
+ 0,
+ 10,
+ 0,
+};
+
+/* This is the Queue Manager handle*/
+DRV_SPI_SYS_QUEUE_MANAGER_HANDLE hQueueManager;
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Instance 0 static driver functions
+// *****************************************************************************
+// *****************************************************************************
+/* This is the driver static object . */
+DRV_SPI_OBJ gDrvSPI0Obj ;
+
+SYS_MODULE_OBJ DRV_SPI0_Initialize(void)
+{
+ DRV_SPI_OBJ *dObj = (DRV_SPI_OBJ*)NULL;
+
+ dObj = &gDrvSPI0Obj;
+
+ /* Disable the SPI module to configure it*/
+ PLIB_SPI_Disable ( SPI_ID_1 );
+
+ /* Set up Master or Slave Mode*/
+ PLIB_SPI_MasterEnable ( SPI_ID_1 );
+ PLIB_SPI_PinDisable(SPI_ID_1, SPI_PIN_SLAVE_SELECT);
+
+ /* Set up if the SPI is allowed to run while the rest of the CPU is in idle mode*/
+ PLIB_SPI_StopInIdleEnable( SPI_ID_1 );
+
+ /* Set up clock Polarity and output data phase*/
+ PLIB_SPI_ClockPolaritySelect( SPI_ID_1, SPI_CLOCK_POLARITY_IDLE_LOW );
+ PLIB_SPI_OutputDataPhaseSelect( SPI_ID_1, SPI_OUTPUT_DATA_PHASE_ON_IDLE_TO_ACTIVE_CLOCK );
+
+ /* Set up the Input Sample Phase*/
+ PLIB_SPI_InputSamplePhaseSelect ( SPI_ID_1, SPI_INPUT_SAMPLING_PHASE_IN_MIDDLE);
+
+ /* Communication Width Selection */
+ PLIB_SPI_CommunicationWidthSelect ( SPI_ID_1, SPI_COMMUNICATION_WIDTH_8BITS );
+
+ /* Baud rate selection */
+ PLIB_SPI_BaudRateSet( SPI_ID_1 , SYS_CLK_PeripheralFrequencyGet(CLK_BUS_PERIPHERAL_2), 10000000 );
+
+ /* Protocol selection */
+ PLIB_SPI_FramedCommunicationDisable( SPI_ID_1 );
+ #if defined (PLIB_SPI_ExistsAudioProtocolControl)
+ if (PLIB_SPI_ExistsAudioProtocolControl(SPI_ID_1))
+ {
+ PLIB_SPI_AudioProtocolDisable(SPI_ID_1);
+ }
+ #endif
+
+ /* Buffer type selection */
+ #if defined (PLIB_SPI_ExistsFIFOControl)
+ if (PLIB_SPI_ExistsFIFOControl( SPI_ID_1 ))
+ {
+ PLIB_SPI_FIFODisable( SPI_ID_1 );
+ }
+ #endif
+
+ PLIB_SPI_BufferClear( SPI_ID_1 );
+ PLIB_SPI_ReceiverOverflowClear ( SPI_ID_1 );
+
+ /* Initialize Queue only once for all instances of SPI driver*/
+ if (DRV_SPI_SYS_QUEUE_Initialize(&qmInitData, &hQueueManager) != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ SYS_ASSERT(false, "\r\nSPI Driver: Could not create queuing system.");
+ return SYS_MODULE_OBJ_INVALID;
+ }
+
+ /* Update the Queue parameters. */
+ qInitData.maxElements = 10; //Queue size
+ qInitData.reserveElements = 1; //Mininmum number of job queues reserved
+
+ /* Create Queue for this instance of SPI */
+ if (DRV_SPI_SYS_QUEUE_CreateQueue(hQueueManager, &qInitData, &dObj->queue) != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ SYS_ASSERT(false, "\r\nSPI Driver: Could not set up driver instance queue.");
+ return SYS_MODULE_OBJ_INVALID;
+
+ }
+
+ /* Update the SPI OBJECT parameters. */
+ dObj->operationStarting = NULL;
+ dObj->operationEnded = NULL;
+ dObj->numTrfsSmPolled = 16;
+
+ /* Enable the Module */
+ PLIB_SPI_Enable(SPI_ID_1);
+
+ return (SYS_MODULE_OBJ)DRV_SPI_INDEX_0 ;
+}
+
+void DRV_SPI0_Deinitialize ( void )
+{
+ /* Disable the SPI Module */
+ PLIB_SPI_Disable(SPI_ID_1);
+
+ return;
+}
+
+SYS_STATUS DRV_SPI0_Status ( void )
+{
+ /* Return the current status of driver instance */
+ return SYS_STATUS_READY;
+}
+
+void DRV_SPI0_Tasks ( void )
+{
+ /* Call the respective task routine */
+ DRV_SPI0_PolledMasterRM8BitTasks(&gDrvSPI0Obj);
+}
+
+DRV_HANDLE DRV_SPI0_Open ( const SYS_MODULE_INDEX index, const DRV_IO_INTENT intent )
+{
+ return (DRV_HANDLE)DRV_SPI_INDEX_0;
+}
+
+void DRV_SPI0_Close ( void )
+{
+ return;
+}
+
+int32_t DRV_SPI0_ClientConfigure ( const DRV_SPI_CLIENT_DATA * cfgData )
+{
+ DRV_SPI_OBJ *dObj = (DRV_SPI_OBJ*)NULL;
+
+ dObj = &gDrvSPI0Obj;
+
+ if (cfgData == NULL)
+ {
+ /* Nothing to do */
+ return 0;
+ }
+
+ if (cfgData->operationStarting != NULL)
+ {
+ dObj->operationStarting = cfgData->operationStarting;
+ }
+
+ if (cfgData->operationEnded != NULL)
+ {
+ dObj->operationEnded = cfgData->operationEnded;
+ }
+
+ if (cfgData->baudRate != 0)
+ {
+
+ PLIB_SPI_BaudRateSet (SPI_ID_1,
+ SYS_CLK_PeripheralFrequencyGet(CLK_BUS_PERIPHERAL_2),
+ cfgData->baudRate);
+ }
+
+ return 0;
+}
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI0_BufferAddRead2 ( void *rxBuffer, size_t size, DRV_SPI_BUFFER_EVENT_HANDLER completeCB, void * context, DRV_SPI_BUFFER_HANDLE * jobHandle)
+{
+ DRV_SPI_OBJ *dObj = (DRV_SPI_OBJ*)NULL;
+
+ dObj = &gDrvSPI0Obj;
+
+ DRV_SPI_JOB_OBJECT * pJob = NULL;
+
+ if (DRV_SPI_SYS_QUEUE_AllocElementLock(dObj->queue, (void **)&pJob) != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ SYS_ASSERT(false, "\r\nSPI Driver: Error trying to get a free entry.");
+ return (DRV_SPI_BUFFER_HANDLE)NULL;
+ }
+
+ memset(pJob, 0, sizeof(DRV_SPI_JOB_OBJECT));
+
+ pJob->rxBuffer = rxBuffer;
+ pJob->dataLeftToRx = size;
+ pJob->dummyLeftToTx = size;
+ pJob->completeCB = completeCB;
+ pJob->context = context;
+ pJob->status = DRV_SPI_BUFFER_EVENT_PENDING;
+
+ if (jobHandle != NULL )
+ {
+ *jobHandle = (DRV_SPI_BUFFER_HANDLE)pJob;
+ }
+
+ if (DRV_SPI_SYS_QUEUE_EnqueueLock(dObj->queue, (void*)pJob) != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ SYS_ASSERT(false, "\r\nSPI Driver: Error enqueing new job.");
+ return (DRV_SPI_BUFFER_HANDLE)NULL;
+ }
+
+ return (DRV_SPI_BUFFER_HANDLE)pJob;
+}
+
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI0_BufferAddWrite2 ( void *txBuffer, size_t size, DRV_SPI_BUFFER_EVENT_HANDLER completeCB, void * context, DRV_SPI_BUFFER_HANDLE * jobHandle )
+{
+ DRV_SPI_OBJ *dObj = (DRV_SPI_OBJ*)NULL;
+
+ dObj = &gDrvSPI0Obj;
+
+ DRV_SPI_JOB_OBJECT * pJob = NULL;
+ if (DRV_SPI_SYS_QUEUE_AllocElementLock(dObj->queue, (void **)&pJob) != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ SYS_ASSERT(false, "\r\nSPI Driver: Error trying to get a free entry.");
+ return (DRV_SPI_BUFFER_HANDLE)NULL;
+ }
+
+ memset(pJob, 0, sizeof(DRV_SPI_JOB_OBJECT));
+ pJob->txBuffer = txBuffer;
+ pJob->dataLeftToTx = size;
+ pJob->dummyLeftToRx = size;
+ pJob->completeCB = completeCB;
+ pJob->context = context;
+ pJob->status = DRV_SPI_BUFFER_EVENT_PENDING;
+
+ if (jobHandle != NULL )
+ {
+ *jobHandle = (DRV_SPI_BUFFER_HANDLE)pJob;
+ }
+
+ if (DRV_SPI_SYS_QUEUE_EnqueueLock(dObj->queue, (void*)pJob) != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ SYS_ASSERT(false, "\r\nSPI Driver: Error enqueing new job.");
+ return (DRV_SPI_BUFFER_HANDLE)NULL;
+ }
+
+ return (DRV_SPI_BUFFER_HANDLE)pJob;
+}
+
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI0_BufferAddWriteRead2 ( void *txBuffer, size_t txSize, void *rxBuffer, size_t rxSize, DRV_SPI_BUFFER_EVENT_HANDLER completeCB, void * context, DRV_SPI_BUFFER_HANDLE * jobHandle )
+{
+ DRV_SPI_OBJ *dObj = (DRV_SPI_OBJ*)NULL;
+
+ dObj = &gDrvSPI0Obj;
+
+ DRV_SPI_JOB_OBJECT * pJob = NULL;
+ if (DRV_SPI_SYS_QUEUE_AllocElementLock(dObj->queue, (void **)&pJob) != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ SYS_ASSERT(false, "\r\nSPI Driver: Error trying to get a free entry.");
+ return (DRV_SPI_BUFFER_HANDLE)NULL;
+ }
+
+ memset(pJob, 0, sizeof(DRV_SPI_JOB_OBJECT));
+ pJob->txBuffer = txBuffer;
+ pJob->dataLeftToTx = txSize;
+ pJob->rxBuffer = rxBuffer;
+ pJob->dataLeftToRx = rxSize;
+
+ if (jobHandle != NULL )
+ {
+ *jobHandle = (DRV_SPI_BUFFER_HANDLE)pJob;
+ }
+ if (rxSize > txSize)
+ {
+ pJob->dummyLeftToTx = rxSize - txSize;
+ }
+ if (txSize > rxSize)
+ {
+ pJob->dummyLeftToRx = txSize - rxSize;
+ }
+ pJob->completeCB = completeCB;
+ pJob->context = context;
+ pJob->status = DRV_SPI_BUFFER_EVENT_PENDING;
+
+ if (DRV_SPI_SYS_QUEUE_EnqueueLock(dObj->queue, (void*)pJob) != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ SYS_ASSERT(false, "\r\nSPI Driver: Error enqueing new job.");
+ return (DRV_SPI_BUFFER_HANDLE)NULL;
+ }
+
+ return (DRV_SPI_BUFFER_HANDLE)pJob;
+}
+
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI0_BufferAddRead ( void *rxBuffer, size_t size, DRV_SPI_BUFFER_EVENT_HANDLER completeCB, void * context)
+{
+ return DRV_SPI0_BufferAddRead2(rxBuffer, size, completeCB, context, NULL);
+}
+
+DRV_SPI_BUFFER_HANDLE DRV_SPI0_BufferAddWrite ( void *txBuffer, size_t size, DRV_SPI_BUFFER_EVENT_HANDLER completeCB, void * context )
+{
+ return DRV_SPI0_BufferAddWrite2(txBuffer, size, completeCB, context, NULL);
+}
+
+DRV_SPI_BUFFER_EVENT DRV_SPI0_BufferStatus ( DRV_SPI_BUFFER_HANDLE bufferHandle )
+{
+ DRV_SPI_JOB_OBJECT * pJob = (DRV_SPI_JOB_OBJECT *)bufferHandle;
+
+ return pJob->status;
+}
+
+
+int32_t DRV_SPI0_PolledErrorTasks(struct DRV_SPI_OBJ * dObj)
+{
+
+ if (dObj->currentJob == NULL)
+ {
+ return 0;
+ }
+
+ register DRV_SPI_JOB_OBJECT * currentJob = dObj->currentJob;
+
+ if (PLIB_SPI_ReceiverHasOverflowed(SPI_ID_1))
+ {
+ currentJob->status = DRV_SPI_BUFFER_EVENT_ERROR;
+ if (currentJob->completeCB != NULL)
+ {
+ (*currentJob->completeCB)(DRV_SPI_BUFFER_EVENT_ERROR, (DRV_SPI_BUFFER_HANDLE)currentJob, currentJob->context);
+ }
+ if (dObj->operationEnded != NULL)
+ {
+ (*dObj->operationEnded)(DRV_SPI_BUFFER_EVENT_ERROR, (DRV_SPI_BUFFER_HANDLE)currentJob, currentJob->context);
+ }
+ if (DRV_SPI_SYS_QUEUE_FreeElementLock(dObj->queue, currentJob) != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ SYS_ASSERT(false, "\r\nSPI Driver: Queue free element error.");
+ return 0;
+ }
+ dObj->currentJob = NULL;
+ PLIB_SPI_BufferClear(SPI_ID_1 );
+ PLIB_SPI_ReceiverOverflowClear (SPI_ID_1 );
+ }
+ return 0;
+}
+
+
+// *********************************************************************************************
+// *********************************************************************************************
+// Section: Old static driver compatibility APIs, these will be deprecated.
+// *********************************************************************************************
+// *********************************************************************************************
+bool DRV_SPI0_ReceiverBufferIsFull(void)
+{
+ return (PLIB_SPI_ReceiverBufferIsFull(SPI_ID_1));
+}
+
+bool DRV_SPI0_TransmitterBufferIsFull(void)
+{
+ return (PLIB_SPI_TransmitBufferIsFull(SPI_ID_1));
+}
+
+int32_t DRV_SPI0_BufferAddWriteRead(const void * txBuffer, void * rxBuffer, uint32_t size)
+{
+ bool continueLoop;
+ int32_t txcounter = 0;
+ int32_t rxcounter = 0;
+ do {
+ continueLoop = false;
+ if(!PLIB_SPI_TransmitBufferIsFull(SPI_ID_1) && txcounter < size)
+ {
+ PLIB_SPI_BufferWrite(SPI_ID_1, ((uint8_t*)txBuffer)[txcounter]);
+ txcounter++;
+ continueLoop = true;
+ }
+
+ while (txcounter != rxcounter)
+ {
+ while(!PLIB_SPI_ReceiverBufferIsFull(SPI_ID_1));
+ ((uint8_t*)rxBuffer)[rxcounter] = PLIB_SPI_BufferRead(SPI_ID_1);
+ rxcounter++;
+ continueLoop = true;
+ }
+ if (txcounter > rxcounter)
+ {
+ continueLoop = true;
+ }
+ }while(continueLoop);
+ return txcounter;
+}
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_local.h b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_local.h
new file mode 100644
index 00000000..8ec49506
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_local.h
@@ -0,0 +1,207 @@
+/* clang-format off */
+/*******************************************************************************
+ SPI Driver Local Data Structures for static implementation
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_spi_static_local.h
+
+ Summary:
+ SPI Driver Local Data Structures for static implementation
+
+ Description:
+ Driver Local Data Structures for static implementation
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute Software
+only when embedded on a Microchip microcontroller or digital signal controller
+that is integrated into your product or third party product (pursuant to the
+sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+#ifndef _DRV_SPI_STATIC_LOCAL_H
+#define _DRV_SPI_STATIC_LOCAL_H
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+#include "system_config.h"
+#include "driver/spi/drv_spi.h"
+#include "system/int/sys_int.h"
+#include "system/debug/sys_debug.h"
+#include "driver/spi/static/src/drv_spi_static_sys_queue.h"
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus // Provide C++ Compatibility
+
+ extern "C" {
+
+#endif
+// DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Data Type Definitions
+// *****************************************************************************
+// *****************************************************************************
+#define MAX(a,b) ((acurrentJob;
+
+ /* Check to see if we have any more bytes to transmit */
+ if (currentJob->dataLeftToTx + currentJob->dummyLeftToTx == 0)
+ {
+ return 0;
+ }
+ /* Check to see if the transmit buffer is empty*/
+ if (!PLIB_SPI_TransmitBufferIsEmpty(SPI_ID_1))
+ {
+ return 0;
+ }
+ /* Make sure that we don't have something in progress and overrun the RX buffer */
+ if (pDrvObj->symbolsInProgress != 0)
+ {
+ return 0;
+ }
+ if (currentJob->dataLeftToTx != 0)
+ {
+ /* Transmit the data & update the counts */
+ PLIB_SPI_BufferWrite(SPI_ID_1, currentJob->txBuffer[currentJob->dataTxed]);
+ currentJob->dataTxed++;
+ currentJob->dataLeftToTx--;
+ }
+ else
+ {
+ /* Transmit the dummy data & update the counts */
+ PLIB_SPI_BufferWrite(SPI_ID_1, 0xff);
+ currentJob->dummyLeftToTx--;
+ }
+ /* We now have a symbol in progress*/
+ pDrvObj->symbolsInProgress = 1;
+
+ return 0;
+}
+
+int32_t DRV_SPI0_MasterRMReceive8BitPolled( struct DRV_SPI_OBJ * pDrvObj )
+{
+ register DRV_SPI_JOB_OBJECT * currentJob = pDrvObj->currentJob;
+
+ if (currentJob == NULL)
+ {
+ return 0;
+ }
+ if (PLIB_SPI_ReceiverBufferIsFull(SPI_ID_1))
+ {
+ /* We have data waiting in the SPI buffer */
+ if (currentJob->dataLeftToRx != 0)
+ {
+ /* Receive the data and updates the count */
+ currentJob->rxBuffer[currentJob->dataRxed] = PLIB_SPI_BufferRead(SPI_ID_1);
+ currentJob->dataRxed++;
+ currentJob->dataLeftToRx --;
+ }
+ else
+ {
+ /* No Data but dummy data: Note: We cannot just clear the
+ buffer because we have to keep track of how many symbols/units we
+ have received, and the number may have increased since we checked
+ how full the buffer is.*/
+ PLIB_SPI_BufferRead(SPI_ID_1);
+ //SYS_CONSOLE_MESSAGE("Rd ");
+ currentJob->dummyLeftToRx--;
+ }
+ /* No longer have a symbol in progress */
+ pDrvObj->symbolsInProgress = 0;
+ }
+
+ return 0;
+}
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.c
new file mode 100644
index 00000000..aadbceec
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.c
@@ -0,0 +1,726 @@
+/* clang-format off */
+/*******************************************************************************
+ SPI Driver Queue related local interfaces
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_spi_static_sys_queue.h
+
+ Summary:
+ Queue related local interface declarations
+
+ Description:
+ Queue related local interface declarations
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute Software
+only when embedded on a Microchip microcontroller or digital signal controller
+that is integrated into your product or third party product (pursuant to the
+sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+#include
+#include "system_config.h"
+#include "system_definitions.h"
+
+DRV_SPI_SYS_QUEUE_RESULT _DRV_SPI_SYS_QUEUE_LockQueue(DRV_SPI_SYS_QUEUE_HANDLE queue, bool freeList);
+DRV_SPI_SYS_QUEUE_RESULT _DRV_SPI_SYS_QUEUE_UnlockQueue(DRV_SPI_SYS_QUEUE_HANDLE queue, bool freeList);
+DRV_SPI_SYS_QUEUE_RESULT _DRV_SPI_SYS_QUEUE_LockQueueManager(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager);
+DRV_SPI_SYS_QUEUE_RESULT _DRV_SPI_SYS_QUEUE_UnlockQueueManager(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager);
+
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Initialize(DRV_SPI_SYS_QUEUE_MANAGER_SETUP * initParams, DRV_SPI_SYS_QUEUE_MANAGER_HANDLE * handle)
+{
+ if (initParams == NULL || initParams->pBuffer == NULL || handle == NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ if (initParams->type != DRV_SPI_SYS_QUEUE_Fifo)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ size_t sizeNeeded = (sizeof(DRV_SPI_SYS_QUEUE_QUEUE_DATA) *
+ initParams->numQueues) +
+ sizeof(DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA) +
+ (sizeof(DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA) +
+ initParams->elementSize);
+
+ if (initParams->bufferLen < sizeNeeded)
+ {
+ return DRV_SPI_SYS_QUEUE_OUT_OF_MEMORY;
+ }
+
+ // Blank the memory area
+ memset(initParams->pBuffer, 0, initParams->bufferLen);
+
+ // Set up the Queue Manager Area
+ DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA * pQueueManager = (DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA *)initParams->pBuffer;
+ pQueueManager->pQueueArea = (DRV_SPI_SYS_QUEUE_QUEUE_DATA*)((uint32_t)pQueueManager + sizeof(DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA));
+ pQueueManager->pElementArea = (DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA*)((uint32_t)pQueueManager->pQueueArea + (sizeof(DRV_SPI_SYS_QUEUE_QUEUE_DATA) * initParams->numQueues) );
+
+ //Set up the Queue Handles
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = pQueueManager->pQueueArea;
+ pQueueManager->pFreeQueueHead = pQueue;
+ pQueueManager->pFreeQueueTail = pQueue;
+ pQueue->pQueueManager = pQueueManager;
+ uint8_t counter;
+ for (counter = 1; counter < initParams->numQueues; counter++)
+ {
+ pQueueManager->pFreeQueueTail->pNext = &(pQueue[counter]);
+ pQueueManager->pFreeQueueTail = &(pQueue[counter]);
+ pQueue[counter].pQueueManager = pQueueManager;
+ }
+
+ // Set up the elements
+ size_t spaceRemaining = initParams->bufferLen -
+ sizeof(DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA) -
+ (sizeof(DRV_SPI_SYS_QUEUE_QUEUE_DATA) * initParams->numQueues);
+ size_t numberOfElements = spaceRemaining /
+ (sizeof(DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA) + initParams->elementSize );
+
+ DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pElement = pQueueManager->pElementArea;
+ pQueueManager->pFreeElementHead = pElement;
+ pQueueManager->pFreeElementTail = pElement;
+
+ for (counter = 1; counter < numberOfElements; counter ++)
+ {
+ pElement = (DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA *)
+ ((uint32_t)pQueueManager->pElementArea +
+ (sizeof(DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA) +
+ initParams->elementSize) *
+ counter);
+ pQueueManager->pFreeElementTail->pNext = pElement;
+ pQueueManager->pFreeElementTail = pElement;
+ }
+ pQueueManager->numFreeElements = numberOfElements;
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ pQueueManager->freeElementsLW = numberOfElements;
+#endif
+ *handle = (DRV_SPI_SYS_QUEUE_MANAGER_HANDLE)pQueueManager;
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Deinitialize(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager)
+{
+ if ((queueManager <= 0) && (queueManager >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_CreateQueue(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager, DRV_SPI_SYS_QUEUE_SETUP * initParams, DRV_SPI_SYS_QUEUE_HANDLE * handle)
+{
+ if ((queueManager <= 0) && (queueManager >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+ DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA * pQueueManager = (DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA *)queueManager;
+ if (initParams == NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+ if (pQueueManager->pFreeQueueHead == NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_OUT_OF_QUEUES;
+ }
+
+ if ((pQueueManager->numReserveElements + initParams->reserveElements) > pQueueManager->numFreeElements)
+ {
+ return DRV_SPI_SYS_QUEUE_OUT_OF_MEMORY;
+ }
+
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = pQueueManager->pFreeQueueHead;
+ pQueueManager->pFreeQueueHead = pQueue->pNext;
+ if (pQueueManager->pFreeQueueHead == NULL)
+ {
+ pQueueManager->pFreeQueueTail = NULL;
+ }
+ memset(pQueue, 0, sizeof(DRV_SPI_SYS_QUEUE_QUEUE_DATA));
+ pQueue->pQueueManager = pQueueManager;
+
+ pQueue->fptrIntChange = initParams->fptrIntChange;
+ pQueue->numReserved = initParams->reserveElements;
+ pQueue->maxElements = initParams->maxElements;
+
+ pQueueManager->numReserveElements += initParams->reserveElements;
+
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ pQueueManager->numQueueCreateOps++;
+ pQueueManager->numQueues++;
+ pQueueManager->reserveElementsLW += initParams->reserveElements;
+ if (pQueueManager->numQueues > pQueueManager->numQueuesHW)
+ {
+ pQueueManager->numQueuesHW = pQueueManager->numQueues;
+ }
+#endif
+
+ *handle = (DRV_SPI_SYS_QUEUE_HANDLE)pQueue;
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_DestroyQueue(DRV_SPI_SYS_QUEUE_HANDLE queue)
+{
+ if ((queue <= 0) && (queue >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = (DRV_SPI_SYS_QUEUE_QUEUE_DATA *)queue;
+ DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA * pQueueManager = pQueue->pQueueManager;
+
+ if (pQueue->pNext != NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+
+ void * pElement = NULL;
+ DRV_SPI_SYS_QUEUE_Dequeue(queue, &pElement);
+ while (pElement != NULL)
+ {
+ DRV_SPI_SYS_QUEUE_FreeElement(queue, pElement);
+ DRV_SPI_SYS_QUEUE_Dequeue(queue, &pElement);
+ }
+
+ pQueueManager->numReserveElements -= pQueue->numReserved;
+ if (pQueueManager->pFreeQueueTail == NULL)
+ {
+ pQueueManager->pFreeQueueTail = pQueue;
+ pQueueManager->pFreeQueueHead = pQueue;
+ }
+ else
+ {
+ pQueue->pNext = pQueueManager->pFreeQueueHead;
+ pQueueManager->pFreeQueueHead = pQueue;
+ }
+
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ pQueueManager->numQueueDestroyOps++;
+ pQueueManager->numQueues--;
+ pQueueManager->reserveElementsLW -= pQueueManager->numReserveElements;
+#endif
+
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_AllocElement(DRV_SPI_SYS_QUEUE_HANDLE queue, void ** element)
+{
+ if (element == NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+ if ((queue <= 0) && (queue >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = (DRV_SPI_SYS_QUEUE_QUEUE_DATA *)queue;
+ DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA * pQueueManager = pQueue->pQueueManager;
+
+ if (pQueue->pNext != NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ if (pQueueManager->pFreeElementHead== NULL)
+ {
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ pQueueManager->outOfMemoryErrors++;
+ pQueue->outOfMemoryErrors++;
+#endif
+ return DRV_SPI_SYS_QUEUE_OUT_OF_MEMORY;
+ }
+
+ if (pQueue->numAlloc == pQueue->maxElements)
+ {
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ pQueueManager->outOfMemoryErrors++;
+ pQueue->outOfMemoryErrors++;
+#endif
+ return DRV_SPI_SYS_QUEUE_OUT_OF_MEMORY;
+ }
+
+ if (pQueue->numAlloc < pQueue->numReserved)
+ {
+ pQueueManager->numReserveElements--;
+ }
+ else if (pQueueManager->numFreeElements == pQueueManager->numReserveElements)
+ {
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ pQueueManager->outOfMemoryErrors++;
+ pQueue->outOfMemoryErrors++;
+#endif
+ return DRV_SPI_SYS_QUEUE_OUT_OF_MEMORY;
+ }
+
+ DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pEntry = pQueueManager->pFreeElementHead;
+ pQueueManager->pFreeElementHead = pEntry->pNext;
+ if (pQueueManager->pFreeElementHead == NULL)
+ {
+ pQueueManager->pFreeElementTail = NULL;
+ }
+ pEntry->pNext = NULL;
+ pQueueManager->numFreeElements --;
+ pQueue->numAlloc++;
+
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ pQueue->numAllocOps ++;
+ pQueueManager->numAllocOps ++;
+ if (pQueueManager->numFreeElements < pQueueManager->freeElementsLW)
+ {
+ pQueueManager->freeElementsLW = pQueueManager->numFreeElements;
+ }
+ if (pQueueManager->numReserveElements < pQueueManager->reserveElementsLW)
+ {
+ pQueueManager->reserveElementsLW = pQueueManager->numReserveElements;
+ }
+ if (pQueue->numAlloc > pQueue->numAllocHW)
+ {
+ pQueue->numAllocHW = pQueue->numAlloc;
+ }
+#endif
+ *element = (void *)((uint32_t)pEntry + sizeof(DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA));
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_FreeElement(DRV_SPI_SYS_QUEUE_HANDLE queue, void * element)
+{
+ if ((queue <= 0) && (queue >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = (DRV_SPI_SYS_QUEUE_QUEUE_DATA *)queue;
+ DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA * pQueueManager = pQueue->pQueueManager;
+
+ if (pQueue->pNext != NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pEntry = (DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA *)((uint32_t)element - sizeof(DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA));
+
+ if (pQueueManager->pFreeElementHead == NULL)
+ {
+ pQueueManager->pFreeElementHead = pEntry;
+ }
+ else
+ {
+ pQueueManager->pFreeElementTail->pNext = pEntry;
+ }
+ pQueueManager->pFreeElementTail = pEntry;
+
+ pQueueManager->numFreeElements++;
+ pQueue->numAlloc--;
+ if (pQueue->numAlloc < pQueue->numReserved)
+ {
+ pQueueManager->numReserveElements++;
+ }
+
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ pQueue->numFreeOps ++;
+ pQueueManager->numFreeOps ++;
+#endif
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Enqueue(DRV_SPI_SYS_QUEUE_HANDLE queue, void * element)
+{
+ if ((queue <= 0) && (queue >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = (DRV_SPI_SYS_QUEUE_QUEUE_DATA *)queue;
+
+ if (pQueue->pNext != NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pEntry = (DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA *)((uint32_t)element - sizeof(DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA));
+
+ if (pQueue->pHead == NULL)
+ {
+ pQueue->pHead = pEntry;
+ pQueue->pTail = pEntry;
+ }
+ else
+ {
+ pQueue->pTail->pNext = pEntry;
+ pQueue->pTail = pEntry;
+ }
+
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ pQueue->numEnqueued++;
+ if (pQueue->numEnqueued > pQueue->numEnqueuedHW)
+ {
+ pQueue->numEnqueuedHW = pQueue->numEnqueued;
+ }
+ pQueue->numEnqueueOps++;
+#endif
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Dequeue(DRV_SPI_SYS_QUEUE_HANDLE queue, void ** element)
+{
+ if (element == NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+ if ((queue <= 0) && (queue >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = (DRV_SPI_SYS_QUEUE_QUEUE_DATA *)queue;
+
+ if (pQueue->pNext != NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+ if (pQueue->pHead == NULL)
+ {
+ *element = NULL;
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+ }
+ DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pEntry = pQueue->pHead;
+ pQueue->pHead = pEntry->pNext;
+ if (pQueue->pHead == NULL)
+ {
+ pQueue->pTail = NULL;
+ }
+
+ pEntry->pNext = NULL;
+
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ pQueue->numEnqueued--;
+ pQueue->numDequeueOps++;
+#endif
+ *element = (void *)((uint32_t)pEntry + sizeof(DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA));
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Peek(DRV_SPI_SYS_QUEUE_HANDLE queue, void ** element)
+{
+ if (element == NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+ if ((queue <= 0) && (queue >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = (DRV_SPI_SYS_QUEUE_QUEUE_DATA *)queue;
+
+ if (pQueue->pNext != NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+ if (pQueue->pHead == NULL)
+ {
+ *element = NULL;
+ }
+ DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pEntry = pQueue->pHead;
+ *element = (void *)((uint32_t)pEntry + sizeof(DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA));
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+
+bool DRV_SPI_SYS_QUEUE_IsEmpty(DRV_SPI_SYS_QUEUE_HANDLE queue)
+{
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = (DRV_SPI_SYS_QUEUE_QUEUE_DATA *)queue;
+ return pQueue->pHead == NULL;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Lock(DRV_SPI_SYS_QUEUE_HANDLE queue)
+{
+
+ return _DRV_SPI_SYS_QUEUE_LockQueue(queue, false);
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Unlock(DRV_SPI_SYS_QUEUE_HANDLE queue)
+{
+ return _DRV_SPI_SYS_QUEUE_UnlockQueue(queue, false);
+}
+
+DRV_SPI_SYS_QUEUE_RESULT _DRV_SPI_SYS_QUEUE_LockQueue(DRV_SPI_SYS_QUEUE_HANDLE queue, bool freeList)
+{
+ if ((queue <= 0) && (queue >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = (DRV_SPI_SYS_QUEUE_QUEUE_DATA *)queue;
+ DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA * pQueueManager = pQueue->pQueueManager;
+
+ if (pQueue->pNext != NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ if (freeList)
+ {
+ return _DRV_SPI_SYS_QUEUE_LockQueueManager((DRV_SPI_SYS_QUEUE_MANAGER_HANDLE)pQueueManager);
+ }
+ else
+ {
+ if (pQueue->fptrIntChange != NULL)
+ {
+ (*pQueue->fptrIntChange)(queue, true);
+ }
+ }
+
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT _DRV_SPI_SYS_QUEUE_UnlockQueue(DRV_SPI_SYS_QUEUE_HANDLE queue, bool freeList)
+{
+ if ((queue <= 0) && (queue >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = (DRV_SPI_SYS_QUEUE_QUEUE_DATA *)queue;
+ DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA * pQueueManager = pQueue->pQueueManager;
+
+ if (pQueue->pNext != NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ if (freeList)
+ {
+ return _DRV_SPI_SYS_QUEUE_UnlockQueueManager((DRV_SPI_SYS_QUEUE_MANAGER_HANDLE)pQueueManager);
+ }
+ else
+ {
+ if (pQueue->fptrIntChange != NULL)
+ {
+ (*pQueue->fptrIntChange)(queue, false);
+ }
+ }
+
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+
+DRV_SPI_SYS_QUEUE_HANDLE DRV_SPI_SYS_QUEUE_CreateQueueLock(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager, DRV_SPI_SYS_QUEUE_SETUP * initParams, DRV_SPI_SYS_QUEUE_HANDLE * queue)
+{
+ DRV_SPI_SYS_QUEUE_RESULT ret;
+ DRV_SPI_SYS_QUEUE_HANDLE ret2;
+ ret = _DRV_SPI_SYS_QUEUE_LockQueueManager(queueManager);
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+
+ ret2 = DRV_SPI_SYS_QUEUE_CreateQueue(queueManager, initParams, queue);
+
+ ret = _DRV_SPI_SYS_QUEUE_UnlockQueueManager(queueManager);
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+ return ret2;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_DestroyQueueLock(DRV_SPI_SYS_QUEUE_HANDLE queue)
+{
+ DRV_SPI_SYS_QUEUE_RESULT ret;
+ DRV_SPI_SYS_QUEUE_RESULT ret2;
+ ret = _DRV_SPI_SYS_QUEUE_LockQueue(queue, true);// TODO!!! Fix this
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+
+ ret2 = DRV_SPI_SYS_QUEUE_DestroyQueue(queue);
+
+ ret = _DRV_SPI_SYS_QUEUE_UnlockQueue(queue, true);
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+ return ret2;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_AllocElementLock(DRV_SPI_SYS_QUEUE_HANDLE queue, void ** element)
+{
+ DRV_SPI_SYS_QUEUE_RESULT ret;
+ DRV_SPI_SYS_QUEUE_RESULT ret2;
+ ret = _DRV_SPI_SYS_QUEUE_LockQueue(queue, true);
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+
+ ret2 = DRV_SPI_SYS_QUEUE_AllocElement(queue, element);
+
+ ret = _DRV_SPI_SYS_QUEUE_UnlockQueue(queue, true);
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+ return ret2;
+}
+
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_FreeElementLock(DRV_SPI_SYS_QUEUE_HANDLE queue, void * element)
+{
+ DRV_SPI_SYS_QUEUE_RESULT ret;
+ DRV_SPI_SYS_QUEUE_RESULT ret2;
+ ret = _DRV_SPI_SYS_QUEUE_LockQueue(queue, true);
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+
+ ret2 = DRV_SPI_SYS_QUEUE_FreeElement(queue, element);
+
+ ret = _DRV_SPI_SYS_QUEUE_UnlockQueue(queue, true);
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+ return ret2;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_EnqueueLock(DRV_SPI_SYS_QUEUE_HANDLE queue, void * element)
+{
+ DRV_SPI_SYS_QUEUE_RESULT ret;
+ DRV_SPI_SYS_QUEUE_RESULT ret2;
+ ret = _DRV_SPI_SYS_QUEUE_LockQueue(queue, false);
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+
+ ret2 = DRV_SPI_SYS_QUEUE_Enqueue(queue, element);
+
+ ret = _DRV_SPI_SYS_QUEUE_UnlockQueue(queue, false);
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+ return ret2;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_DequeueLock(DRV_SPI_SYS_QUEUE_HANDLE queue, void ** element)
+{
+ DRV_SPI_SYS_QUEUE_RESULT ret;
+ DRV_SPI_SYS_QUEUE_RESULT ret2;
+ ret = _DRV_SPI_SYS_QUEUE_LockQueue(queue, false);
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+
+ ret2 = DRV_SPI_SYS_QUEUE_Dequeue(queue, element);
+
+ ret = _DRV_SPI_SYS_QUEUE_UnlockQueue(queue, false);
+ if (ret != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ return ret;
+ }
+ return ret2;
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_QueueManagerStatus(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager, DRV_SPI_SYS_QUEUE_MANAGER_STATUS * status)
+{
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ if ((queueManager <= 0) && (queueManager >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+ DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA * pQueueManager = (DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA *)queueManager;
+
+ status->numAllocOps = pQueueManager->numAllocOps;
+ status->numFreeOps = pQueueManager->numFreeOps;
+ status->numQueueCreateOps = pQueueManager->numQueueCreateOps;
+ status->numQueueDestroyOps = pQueueManager->numQueueDestroyOps;
+ status->numReserveElements = pQueueManager->numReserveElements;
+ status->numFreeElements = pQueueManager->numFreeElements;
+ status->freeElementsLW = pQueueManager->freeElementsLW;
+ status->reserveElementsLW = pQueueManager->reserveElementsLW;
+ status->outOfMemoryErrors = pQueueManager->outOfMemoryErrors;
+ status->numQueues = pQueueManager->numQueues;
+ status->numQueuesHW = pQueueManager->numQueuesHW;
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+#else
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+#endif
+}
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_QueueStatus(DRV_SPI_SYS_QUEUE_HANDLE queue, DRV_SPI_SYS_QUEUE_STATUS * status)
+{
+#if _SPI_DRV_SYS_QUEUE_TRACKING
+ if ((queue <= 0) && (queue >= DRV_SPI_SYS_QUEUE_MAX_ERROR))
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueue = (DRV_SPI_SYS_QUEUE_QUEUE_DATA *)queue;
+
+ if (pQueue->pNext != NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+ if (status == NULL)
+ {
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+ }
+
+ status->numAllocOps = pQueue->numAllocOps;
+ status->numFreeOps = pQueue->numFreeOps;
+ status->numDequeueOps = pQueue->numDequeueOps;
+ status->numEnqueueOps = pQueue->numEnqueueOps;
+ status->numReserved = pQueue->numReserved;
+ status->numAlloc = pQueue->numAlloc;
+ status->numEnqueued = pQueue->numEnqueued;
+ status->numReserveLW = pQueue->numReserveLW;
+ status->numAllocHW = pQueue->numAllocHW;
+ status->numEnqueuedHW = pQueue->numEnqueuedHW;
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+#else
+ return DRV_SPI_SYS_QUEUE_INVALID_PARAMETER;
+#endif
+
+}
+
+DRV_SPI_SYS_QUEUE_RESULT _DRV_SPI_SYS_QUEUE_LockQueueManager(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager)
+{
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
+DRV_SPI_SYS_QUEUE_RESULT _DRV_SPI_SYS_QUEUE_UnlockQueueManager(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager)
+{
+ return DRV_SPI_SYS_QUEUE_SUCCESS;
+}
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.h b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.h
new file mode 100644
index 00000000..34c3f087
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.h
@@ -0,0 +1,203 @@
+/* clang-format off */
+/*******************************************************************************
+ SPI Driver Queue related local interfaces
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_spi_static_sys_queue.h
+
+ Summary:
+ Queue related local interface declarations
+
+ Description:
+ Queue related local interface declarations
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute Software
+only when embedded on a Microchip microcontroller or digital signal controller
+that is integrated into your product or third party product (pursuant to the
+sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+#ifndef _DRV_SPI_STATIC_SYS_QUEUE_H
+#define _DRV_SPI_STATIC_SYS_QUEUE_H
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+#include "system_config.h"
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus // Provide C++ Compatibility
+
+ extern "C" {
+
+#endif
+// DOM-IGNORE-END
+
+#define _DRV_SPI_QM_SIZE 72
+#define _DRV_SPI_Q_SIZE 80
+#define _DRV_SPI_QE_SIZE 4
+
+#define DRV_SPI_SYS_QUEUE_BUFFER_SIZE(queues, elementSize, desiredElements) \
+ ( _DRV_SPI_QM_SIZE + \
+ (_DRV_SPI_Q_SIZE * queues) + \
+ ((elementSize + _DRV_SPI_QE_SIZE) * \
+ desiredElements) )
+
+// *****************************************************************************
+/* SPI Driver Queue Manager Handle
+
+ Summary:
+ Handle identifying the queue manager
+
+ Description:
+ A queue manager handle value is returned by a call to the DRV_SPI_SYS_QUEUE_Initialize() function.
+ This handle is associated with the buffer passed into the function and it allows the
+ application to track the queue.
+ Remarks:
+ None
+*/
+
+typedef uintptr_t DRV_SPI_SYS_QUEUE_MANAGER_HANDLE;
+
+// *****************************************************************************
+/* SPI Driver Queue Handle
+
+ Summary:
+ Handle identifying the queue
+
+ Description:
+ A queue handle value is returned by a call to the DRV_SPI_SYS_QUEUE_CreateQueue () function.
+ This handle is associated with the buffer passed into the the DRV_SPI_SYS_QUEUE_Initialize() function.
+ Remarks:
+ None
+*/
+
+typedef uintptr_t DRV_SPI_SYS_QUEUE_HANDLE;
+
+
+
+typedef enum {
+ DRV_SPI_SYS_QUEUE_SUCCESS = 0,
+ DRV_SPI_SYS_QUEUE_OUT_OF_MEMORY = -1,
+ DRV_SPI_SYS_QUEUE_OUT_OF_QUEUES = -2,
+ DRV_SPI_SYS_QUEUE_INVALID_PARAMETER = -3,
+ DRV_SPI_SYS_QUEUE_MAX_ERROR = DRV_SPI_SYS_QUEUE_INVALID_PARAMETER,
+}DRV_SPI_SYS_QUEUE_RESULT;
+
+typedef enum {
+
+ DRV_SPI_SYS_QUEUE_Unknown = 0,
+ DRV_SPI_SYS_QUEUE_Fifo = 1,
+}DRV_SPI_SYS_QUEUE_Type;
+
+typedef void ( *DRV_SPI_SYS_QUEUE_INTERUPT_CHANGE ) (DRV_SPI_SYS_QUEUE_HANDLE queue, bool mask);
+
+
+typedef struct _DRV_SPI_SYS_QUEUE_MANAGER_SETUP
+{
+ void * pBuffer;
+ size_t bufferLen;
+ uint8_t numQueues;
+ size_t elementSize;
+ DRV_SPI_SYS_QUEUE_Type type;
+}DRV_SPI_SYS_QUEUE_MANAGER_SETUP;
+
+typedef struct _DRV_SPI_SYS_QUEUE_SETUP
+{
+ size_t reserveElements;
+ size_t maxElements;
+ DRV_SPI_SYS_QUEUE_INTERUPT_CHANGE fptrIntChange;
+}DRV_SPI_SYS_QUEUE_SETUP;
+
+typedef struct _DRV_SPI_SYS_QUEUE_MANAGER_STATUS
+{
+ size_t numAllocOps;
+ size_t numFreeOps;
+ size_t numQueueCreateOps;
+ size_t numQueueDestroyOps;
+ size_t numReserveElements;
+ size_t numFreeElements;
+ size_t freeElementsLW;
+ size_t reserveElementsLW;
+ size_t outOfMemoryErrors;
+ uint8_t numQueues;
+ uint8_t numQueuesHW;
+} DRV_SPI_SYS_QUEUE_MANAGER_STATUS;
+
+typedef struct _DRV_SPI_SYS_QUEUE_STATUS
+{
+ size_t numAllocOps;
+ size_t numFreeOps;
+ size_t numDequeueOps;
+ size_t numEnqueueOps;
+ size_t numReserved;
+ size_t numAlloc;
+ size_t numEnqueued;
+ size_t numReserveLW;
+ size_t numAllocHW;
+ size_t numEnqueuedHW;
+}DRV_SPI_SYS_QUEUE_STATUS;
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Initialize(DRV_SPI_SYS_QUEUE_MANAGER_SETUP * initParams, DRV_SPI_SYS_QUEUE_MANAGER_HANDLE * handle);
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Deinitialize(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager);
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_CreateQueue(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager, DRV_SPI_SYS_QUEUE_SETUP * initParams, DRV_SPI_SYS_QUEUE_HANDLE * handle);
+DRV_SPI_SYS_QUEUE_HANDLE DRV_SPI_SYS_QUEUE_CreateQueueLock(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager, DRV_SPI_SYS_QUEUE_SETUP * initParams, DRV_SPI_SYS_QUEUE_HANDLE * queue);
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_DestroyQueue(DRV_SPI_SYS_QUEUE_HANDLE queue);
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_DestroyQueueLock(DRV_SPI_SYS_QUEUE_HANDLE queue);
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Lock(DRV_SPI_SYS_QUEUE_HANDLE queue);
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Unlock(DRV_SPI_SYS_QUEUE_HANDLE queue);
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_AllocElement(DRV_SPI_SYS_QUEUE_HANDLE queue, void ** element);
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_AllocElementLock(DRV_SPI_SYS_QUEUE_HANDLE queue, void ** element);
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_FreeElement(DRV_SPI_SYS_QUEUE_HANDLE queue, void * element);
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_FreeElementLock(DRV_SPI_SYS_QUEUE_HANDLE queue, void * element);
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Enqueue(DRV_SPI_SYS_QUEUE_HANDLE queue, void * element);
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_EnqueueLock(DRV_SPI_SYS_QUEUE_HANDLE queue, void * element);
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Dequeue(DRV_SPI_SYS_QUEUE_HANDLE queue, void ** element);
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_DequeueLock(DRV_SPI_SYS_QUEUE_HANDLE queue, void ** element);
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_Peek(DRV_SPI_SYS_QUEUE_HANDLE queue, void ** element);
+
+bool DRV_SPI_SYS_QUEUE_IsEmpty(DRV_SPI_SYS_QUEUE_HANDLE queue);
+
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_QueueManagerStatus(DRV_SPI_SYS_QUEUE_MANAGER_HANDLE queueManager, DRV_SPI_SYS_QUEUE_MANAGER_STATUS * status);
+DRV_SPI_SYS_QUEUE_RESULT DRV_SPI_SYS_QUEUE_QueueStatus(DRV_SPI_SYS_QUEUE_HANDLE queue, DRV_SPI_SYS_QUEUE_STATUS * status);
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus
+}
+#endif
+// DOM-IGNORE-END
+
+#endif //_DRV_SPI_STATIC_SYS_QUEUE_H_
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_tasks.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_tasks.c
new file mode 100644
index 00000000..ea5c26f5
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_tasks.c
@@ -0,0 +1,150 @@
+/* clang-format off */
+/*******************************************************************************
+ SPI Driver Functions for Static Driver Tasks Functions
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_spi_static_tasks.c
+
+ Summary:
+ SPI driver tasks functions
+
+ Description:
+ The SPI device driver provides a simple interface to manage the SPI
+ modules on Microchip microcontrollers. This file contains implemenation
+ for the SPI driver.
+
+ Remarks:
+ This file is generated from framework/driver/spi/template/drv_spi_static_tasks.c.ftl
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+#include "system_config.h"
+#include "system_definitions.h"
+
+
+
+int32_t DRV_SPI0_PolledMasterRM8BitTasks ( struct DRV_SPI_OBJ * dObj )
+{
+ volatile bool continueLoop;
+ uint8_t counter = 0;
+ uint8_t numPolled = dObj->numTrfsSmPolled;
+ uint8_t result = 0;
+ do {
+
+ DRV_SPI_JOB_OBJECT * currentJob = dObj->currentJob;
+
+ /* Check for a new task */
+ if (dObj->currentJob == NULL)
+ {
+ if (DRV_SPI_SYS_QUEUE_DequeueLock(dObj->queue, (void *)&(dObj->currentJob)) != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ SYS_ASSERT(false, "\r\nSPI Driver: Error in dequeing.");
+ return 0;
+ }
+ if (dObj->currentJob == NULL)
+ {
+ return 0;
+ }
+ currentJob = dObj->currentJob;
+
+ dObj->symbolsInProgress = 0;
+
+ /* Call the operation starting function pointer. This can be used to modify the slave select lines */
+ if (dObj->operationStarting != NULL)
+ {
+ (*dObj->operationStarting)(DRV_SPI_BUFFER_EVENT_PROCESSING, (DRV_SPI_BUFFER_HANDLE)currentJob, currentJob->context);
+ }
+
+ /* List the new job as processing*/
+ currentJob->status = DRV_SPI_BUFFER_EVENT_PROCESSING;
+ /* Flush out the Receive buffer */
+ PLIB_SPI_BufferClear(SPI_ID_1);
+ }
+
+
+ continueLoop = false;
+
+ /* Execute the sub tasks */
+ if
+ (currentJob->dataLeftToTx +currentJob->dummyLeftToTx != 0)
+ {
+ DRV_SPI0_MasterRMSend8BitPolled(dObj);
+ }
+
+ DRV_SPI0_PolledErrorTasks(dObj);
+
+ /* Figure out how many bytes are left to be received */
+ volatile size_t bytesLeft = currentJob->dataLeftToRx + currentJob->dummyLeftToRx;
+
+ // Check to see if we have any data left to receive and update the bytes left.
+ if (bytesLeft != 0)
+ {
+ DRV_SPI0_MasterRMReceive8BitPolled(dObj);
+ bytesLeft = currentJob->dataLeftToRx + currentJob->dummyLeftToRx;
+ }
+ if (bytesLeft == 0)
+ {
+ /* Job is complete*/
+ currentJob->status = DRV_SPI_BUFFER_EVENT_COMPLETE;
+ /* Call the job complete call back*/
+ if (currentJob->completeCB != NULL)
+ {
+ (*currentJob->completeCB)(DRV_SPI_BUFFER_EVENT_COMPLETE, (DRV_SPI_BUFFER_HANDLE)currentJob, currentJob->context);
+ }
+
+ /* Call the operation complete call back. This is different than the
+ job complete callback. This can be used to modify the Slave Select line.*/
+
+ if (dObj->operationEnded != NULL)
+ {
+ (*dObj->operationEnded)(DRV_SPI_BUFFER_EVENT_COMPLETE, (DRV_SPI_BUFFER_HANDLE)currentJob, currentJob->context);
+ }
+
+ /* Return the job back to the free queue*/
+ if (DRV_SPI_SYS_QUEUE_FreeElementLock(dObj->queue, currentJob) != DRV_SPI_SYS_QUEUE_SUCCESS)
+ {
+ SYS_ASSERT(false, "\r\nSPI Driver: Queue free element error.");
+ return 0;
+ }
+ /* Clean up */
+ dObj->currentJob = NULL;
+ }
+
+
+ counter ++;
+ if ((counter < numPolled) && (result != 0))
+ {
+ continueLoop = true;
+ }
+
+ } while(continueLoop);
+ return 0;
+}
+
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/drv_usart_static.h b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/drv_usart_static.h
new file mode 100644
index 00000000..63a8dbca
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/drv_usart_static.h
@@ -0,0 +1,123 @@
+/* clang-format off */
+/*******************************************************************************
+ USART Driver Interface Declarations for Static Single Instance Driver
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_usart_static.h
+
+ Summary:
+ USART driver interface declarations for the static single instance driver.
+
+ Description:
+ The USART device driver provides a simple interface to manage the USART
+ modules on Microchip microcontrollers. This file defines the interface
+ Declarations for the USART static driver.
+
+ Remarks:
+ Static interfaces incorporate the driver instance number within the names
+ of the routines, eliminating the need for an object ID or object handle.
+
+ Static single-open interfaces also eliminate the need for the open handle.
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+#ifndef _DRV_USART_STATIC_H
+#define _DRV_USART_STATIC_H
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+#include "driver/usart/src/drv_usart_static_local.h"
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus // Provide C++ Compatibility
+
+ extern "C" {
+
+#endif
+// DOM-IGNORE-END
+
+// *********************************************************************************************
+// *********************************************************************************************
+// Section: System Interface Headers for the Instance 0 of USART static driver
+// *********************************************************************************************
+// *********************************************************************************************
+
+SYS_MODULE_OBJ DRV_USART0_Initialize(void);
+void DRV_USART0_Deinitialize(void);
+SYS_STATUS DRV_USART0_Status(void);
+void DRV_USART0_TasksTransmit(void);
+void DRV_USART0_TasksReceive(void);
+void DRV_USART0_TasksError(void);
+
+// *********************************************************************************************
+// *********************************************************************************************
+// Section: General Client Interface Headers for the Instance 0 of USART static driver
+// *********************************************************************************************
+// *********************************************************************************************
+
+DRV_HANDLE DRV_USART0_Open(const SYS_MODULE_INDEX index, const DRV_IO_INTENT ioIntent);
+void DRV_USART0_Close(void);
+DRV_USART_CLIENT_STATUS DRV_USART0_ClientStatus(void);
+DRV_USART_TRANSFER_STATUS DRV_USART0_TransferStatus(void);
+
+// *********************************************************************************************
+// *********************************************************************************************
+// Section: Byte Model Client Interface Headers for the Instance 0 of USART static driver
+// *********************************************************************************************
+// *********************************************************************************************
+
+uint8_t DRV_USART0_ReadByte( void);
+void DRV_USART0_WriteByte( const uint8_t byte);
+unsigned int DRV_USART0_ReceiverBufferSizeGet(void);
+unsigned int DRV_USART0_TransmitBufferSizeGet(void);
+bool DRV_USART0_ReceiverBufferIsEmpty( void );
+bool DRV_USART0_TransmitBufferIsFull(void);
+
+// *********************************************************************************************
+// *********************************************************************************************
+// Section: Set up Client Interface Headers for the Instance 0 of USART static driver
+// *********************************************************************************************
+// *********************************************************************************************
+DRV_USART_BAUD_SET_RESULT DRV_USART0_BaudSet(uint32_t baud);
+DRV_USART_LINE_CONTROL_SET_RESULT DRV_USART0_LineControlSet(DRV_USART_LINE_CONTROL lineControlMode);
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus
+}
+#endif
+// DOM-IGNORE-END
+
+#endif // #ifndef _DRV_USART_STATIC_H
+/*******************************************************************************
+ End of File
+*/
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_mapping.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_mapping.c
new file mode 100644
index 00000000..db5dfa41
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_mapping.c
@@ -0,0 +1,439 @@
+/* clang-format off */
+/*******************************************************************************
+ USART Driver Dynamic to Static mapping
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_usart_mapping.c
+
+ Summary:
+ Source code for the USART driver dynamic APIs to static API mapping.
+
+ Description:
+ This file contains code that maps dynamic APIs to static whenever
+ the static mode of the driver is selected..
+
+ Remarks:
+ Static interfaces incorporate the driver instance number within the names
+ of the routines, eliminating the need for an object ID or object handle.
+
+ Static single-open interfaces also eliminate the need for the open handle.
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+#include "system_config.h"
+#include "system_definitions.h"
+
+
+SYS_MODULE_OBJ DRV_USART_Initialize(const SYS_MODULE_INDEX index,const SYS_MODULE_INIT * const init)
+{
+ SYS_MODULE_OBJ returnValue;
+
+ switch(index)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_Initialize();
+ break;
+ }
+ default:
+ {
+ returnValue = SYS_MODULE_OBJ_INVALID;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+void DRV_USART_Deinitialize( SYS_MODULE_OBJ object)
+{
+ switch(object)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ DRV_USART0_Deinitialize();
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+}
+
+SYS_STATUS DRV_USART_Status( SYS_MODULE_OBJ object)
+{
+ SYS_STATUS returnValue;
+
+ switch(object)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_Status();
+ break;
+ }
+ default:
+ {
+ returnValue = SYS_STATUS_ERROR;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+void DRV_USART_TasksTransmit ( SYS_MODULE_OBJ object )
+{
+ switch(object)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ DRV_USART0_TasksTransmit();
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+}
+
+void DRV_USART_TasksReceive ( SYS_MODULE_OBJ object )
+{
+ switch(object)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ DRV_USART0_TasksReceive();
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+}
+
+void DRV_USART_TasksError ( SYS_MODULE_OBJ object )
+{
+ switch(object)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ DRV_USART0_TasksError();
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+}
+
+
+//client interface
+DRV_HANDLE DRV_USART_Open( const SYS_MODULE_INDEX index, const DRV_IO_INTENT ioIntent)
+{
+ DRV_HANDLE returnValue;
+
+ switch(index)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_Open(index,ioIntent);
+ break;
+ }
+ default:
+ {
+ returnValue = DRV_HANDLE_INVALID;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+void DRV_USART_Close( const DRV_HANDLE handle)
+{
+ uintptr_t instance;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ DRV_USART0_Close();
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+}
+
+DRV_USART_CLIENT_STATUS DRV_USART_ClientStatus ( DRV_HANDLE handle )
+{
+ uintptr_t instance;
+ DRV_USART_CLIENT_STATUS returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_ClientStatus();
+ break;
+ }
+ default:
+ {
+ returnValue = DRV_CLIENT_STATUS_ERROR;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+DRV_USART_TRANSFER_STATUS DRV_USART_TransferStatus( const DRV_HANDLE handle )
+{
+ uintptr_t instance;
+ DRV_USART_TRANSFER_STATUS returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_TransferStatus();
+ break;
+ }
+ default:
+ {
+ returnValue = (DRV_USART_TRANSFER_STATUS)NULL;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+
+
+//Byte Model
+uint8_t DRV_USART_ReadByte( const DRV_HANDLE handle )
+{
+ uintptr_t instance;
+ uint8_t returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_ReadByte();
+ break;
+ }
+ default:
+ {
+ SYS_ASSERT(false, "Incorrect Driver Handle");
+ returnValue = 0;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+void DRV_USART_WriteByte( const DRV_HANDLE handle, const uint8_t byte)
+{
+ uintptr_t instance;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ DRV_USART0_WriteByte(byte);
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+}
+
+unsigned int DRV_USART_ReceiverBufferSizeGet( const DRV_HANDLE handle )
+{
+ uintptr_t instance;
+ unsigned int returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_ReceiverBufferSizeGet();
+ break;
+ }
+ default:
+ {
+ returnValue = (unsigned int)NULL;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+unsigned int DRV_USART_TransmitBufferSizeGet( const DRV_HANDLE handle )
+{
+ uintptr_t instance;
+ unsigned int returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_TransmitBufferSizeGet();
+ break;
+ }
+ default:
+ {
+ returnValue = (unsigned int)NULL;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+bool DRV_USART_ReceiverBufferIsEmpty( const DRV_HANDLE handle )
+{
+ uintptr_t instance;
+ bool returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_ReceiverBufferIsEmpty();
+ break;
+ }
+ default:
+ {
+ returnValue = false;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+bool DRV_USART_TransmitBufferIsFull( const DRV_HANDLE handle )
+{
+ uintptr_t instance;
+ bool returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_TransmitBufferIsFull();
+ break;
+ }
+ default:
+ {
+ returnValue = false;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+DRV_USART_BAUD_SET_RESULT DRV_USART_BaudSet(const DRV_HANDLE handle, uint32_t baud)
+{
+ uintptr_t instance;
+ DRV_USART_BAUD_SET_RESULT returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_BaudSet(baud);
+ break;
+ }
+ default:
+ {
+ returnValue = DRV_USART_BAUD_SET_ERROR;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+DRV_USART_LINE_CONTROL_SET_RESULT DRV_USART_LineControlSet(const DRV_HANDLE handle,const DRV_USART_LINE_CONTROL lineControl)
+{
+ uintptr_t instance;
+ DRV_USART_LINE_CONTROL_SET_RESULT returnValue;
+
+ instance = handle & 0x00FF;
+ //As we are handling single client, only multiple instance is taken care.
+ switch(instance)
+ {
+ case DRV_USART_INDEX_0:
+ {
+ returnValue = DRV_USART0_LineControlSet(lineControl);
+ break;
+ }
+ default:
+ {
+ returnValue = DRV_USART_LINE_CONTROL_SET_ERROR;
+ break;
+ }
+ }
+ return returnValue;
+}
+
+
+/*******************************************************************************
+ End of File
+*/
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static.c
new file mode 100644
index 00000000..dba71db7
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static.c
@@ -0,0 +1,337 @@
+/* clang-format off */
+/*******************************************************************************
+ USART Driver Static implementation
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_usart_static.c
+
+ Summary:
+ Source code for the USART driver static implementation.
+
+ Description:
+ The USART device driver provides a simple interface to manage the USART
+ modules on Microchip microcontrollers. This file contains static implementation
+ for the USART driver.
+
+ Remarks:
+ Static interfaces incorporate the driver instance number within the names
+ of the routines, eliminating the need for an object ID or object handle.
+
+ Static single-open interfaces also eliminate the need for the open handle.
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+
+#include "system_config.h"
+#include "system_definitions.h"
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Global Data
+// *****************************************************************************
+// *****************************************************************************
+
+/* This is the driver static object . */
+DRV_USART_OBJ gDrvUSART0Obj ;
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Instance 0 static driver functions
+// *****************************************************************************
+// *****************************************************************************
+
+SYS_MODULE_OBJ DRV_USART0_Initialize(void)
+{
+ uint32_t clockSource;
+
+ /* Disable the USART module to configure it*/
+ PLIB_USART_Disable (USART_ID_2);
+
+ /* Initialize the USART based on configuration settings */
+ PLIB_USART_InitializeModeGeneral(USART_ID_2,
+ false, /*Auto baud*/
+ false, /*LoopBack mode*/
+ false, /*Auto wakeup on start*/
+ false, /*IRDA mode*/
+ false); /*Stop In Idle mode*/
+
+ /* Set the line control mode */
+ PLIB_USART_LineControlModeSelect(USART_ID_2, DRV_USART_LINE_CONTROL_8NONE1);
+
+ /* We set the receive interrupt mode to receive an interrupt whenever FIFO
+ is not empty */
+ PLIB_USART_InitializeOperation(USART_ID_2,
+ USART_RECEIVE_FIFO_ONE_CHAR,
+ USART_TRANSMIT_FIFO_IDLE,
+ USART_ENABLE_TX_RX_USED);
+
+ /* Get the USART clock source value*/
+ clockSource = SYS_CLK_PeripheralFrequencyGet ( CLK_BUS_PERIPHERAL_1 );
+
+ /* Set the baud rate and enable the USART */
+ PLIB_USART_BaudSetAndEnable(USART_ID_2,
+ clockSource,
+ 115200); /*Desired Baud rate value*/
+
+ /* Clear the interrupts to be on the safer side*/
+ SYS_INT_SourceStatusClear(INT_SOURCE_USART_2_TRANSMIT);
+ SYS_INT_SourceStatusClear(INT_SOURCE_USART_2_RECEIVE);
+ SYS_INT_SourceStatusClear(INT_SOURCE_USART_2_ERROR);
+
+ /* Enable the error interrupt source */
+ SYS_INT_SourceEnable(INT_SOURCE_USART_2_ERROR);
+
+ /* Enable the Receive interrupt source */
+ SYS_INT_SourceEnable(INT_SOURCE_USART_2_RECEIVE);
+
+ /* Return the driver instance value*/
+ return (SYS_MODULE_OBJ)DRV_USART_INDEX_0;
+}
+
+void DRV_USART0_Deinitialize(void)
+{
+ bool status;
+
+ /* Disable the interrupts */
+ status = SYS_INT_SourceDisable(INT_SOURCE_USART_2_TRANSMIT) ;
+ status = SYS_INT_SourceDisable(INT_SOURCE_USART_2_RECEIVE) ;
+ status = SYS_INT_SourceDisable(INT_SOURCE_USART_2_ERROR);
+ /* Ignore the warning */
+ (void)status;
+
+ /* Disable USART module */
+ PLIB_USART_Disable (USART_ID_2);
+
+}
+
+
+SYS_STATUS DRV_USART0_Status(void)
+{
+ /* Return the status as ready always */
+ return SYS_STATUS_READY;
+}
+
+
+void DRV_USART0_TasksTransmit(void)
+{
+ /* This is the USART Driver Transmit tasks routine.
+ In this function, the driver checks if a transmit
+ interrupt is active and performs respective action*/
+
+ /* Reading the transmit interrupt flag */
+ if(SYS_INT_SourceStatusGet(INT_SOURCE_USART_2_TRANSMIT))
+ {
+ /* Disable the interrupt, to avoid calling ISR continuously*/
+ SYS_INT_SourceDisable(INT_SOURCE_USART_2_TRANSMIT);
+
+ /* Clear up the interrupt flag */
+ SYS_INT_SourceStatusClear(INT_SOURCE_USART_2_TRANSMIT);
+ }
+}
+
+void DRV_USART0_TasksReceive(void)
+{
+ /* This is the USART Driver Receive tasks routine. If the receive
+ interrupt flag is set, the tasks routines are executed.
+ */
+
+ /* Reading the receive interrupt flag */
+ if(SYS_INT_SourceStatusGet(INT_SOURCE_USART_2_RECEIVE))
+ {
+
+ /* Clear up the interrupt flag */
+ SYS_INT_SourceStatusClear(INT_SOURCE_USART_2_RECEIVE);
+ }
+}
+
+
+void DRV_USART0_TasksError(void)
+{
+ /* This is the USART Driver Error tasks routine. In this function, the
+ * driver checks if an error interrupt has occurred. If so the error
+ * condition is cleared. */
+
+ /* Reading the error interrupt flag */
+ if(SYS_INT_SourceStatusGet(INT_SOURCE_USART_2_ERROR))
+ {
+ /* This means an error has occurred */
+ if(PLIB_USART_ReceiverOverrunHasOccurred(USART_ID_2))
+ {
+ PLIB_USART_ReceiverOverrunErrorClear(USART_ID_2);
+ }
+
+ /* Clear up the error interrupt flag */
+ SYS_INT_SourceStatusClear(INT_SOURCE_USART_2_ERROR);
+ }
+}
+
+DRV_HANDLE DRV_USART0_Open(const SYS_MODULE_INDEX index, const DRV_IO_INTENT ioIntent)
+{
+
+ /* Return the driver instance value*/
+ return ((DRV_HANDLE)DRV_USART_INDEX_0 );
+}
+
+void DRV_USART0_Close(void)
+{
+ return;
+}
+
+DRV_USART_CLIENT_STATUS DRV_USART0_ClientStatus(void)
+{
+ /* Return the status as ready always*/
+ return DRV_USART_CLIENT_STATUS_READY;
+}
+
+DRV_USART_TRANSFER_STATUS DRV_USART0_TransferStatus( void )
+{
+ DRV_USART_TRANSFER_STATUS result = 0;
+
+ /* Check if RX data available */
+ if(PLIB_USART_ReceiverDataIsAvailable(USART_ID_2))
+ {
+ result|= DRV_USART_TRANSFER_STATUS_RECEIVER_DATA_PRESENT;
+ }
+ else
+ {
+ result|= DRV_USART_TRANSFER_STATUS_RECEIVER_EMPTY;
+ }
+
+ /* Check if TX Buffer is empty */
+ if(PLIB_USART_TransmitterIsEmpty(USART_ID_2))
+ {
+ result|= DRV_USART_TRANSFER_STATUS_TRANSMIT_EMPTY;
+ }
+
+ /* Check if the TX buffer is full */
+ if(PLIB_USART_TransmitterBufferIsFull(USART_ID_2))
+ {
+ result|= DRV_USART_TRANSFER_STATUS_TRANSMIT_FULL;
+ }
+
+ return(result);
+}
+
+
+
+
+
+DRV_USART_BAUD_SET_RESULT DRV_USART0_BaudSet(uint32_t baud)
+{
+ uint32_t clockSource;
+ int32_t brgValueLow=0;
+ int32_t brgValueHigh=0;
+ DRV_USART_BAUD_SET_RESULT retVal = DRV_USART_BAUD_SET_SUCCESS;
+#if defined (PLIB_USART_ExistsModuleBusyStatus)
+ bool isEnabled = false;
+#endif
+
+ /* Get the USART clock source value*/
+ clockSource = SYS_CLK_PeripheralFrequencyGet ( CLK_BUS_PERIPHERAL_1 );
+
+ /* Calculate low and high baud values */
+ brgValueLow = ( (clockSource/baud) >> 4 ) - 1;
+ brgValueHigh = ( (clockSource/baud) >> 2 ) - 1;
+
+#if defined (PLIB_USART_ExistsModuleBusyStatus)
+ isEnabled = PLIB_USART_ModuleIsBusy (USART_ID_2);
+ if (isEnabled)
+ {
+ PLIB_USART_Disable (USART_ID_2);
+ while (PLIB_USART_ModuleIsBusy (USART_ID_2));
+ }
+#endif
+
+ /* Check if the baud value can be set with high baud settings */
+ if ((brgValueHigh >= 0) && (brgValueHigh <= UINT16_MAX))
+ {
+ PLIB_USART_BaudRateHighEnable(USART_ID_2);
+ PLIB_USART_BaudRateHighSet(USART_ID_2,clockSource,baud);
+ }
+
+ /* Check if the baud value can be set with low baud settings */
+ else if ((brgValueLow >= 0) && (brgValueLow <= UINT16_MAX))
+ {
+ PLIB_USART_BaudRateHighDisable(USART_ID_2);
+ PLIB_USART_BaudRateSet(USART_ID_2, clockSource, baud);
+ }
+ else
+ {
+ retVal = DRV_USART_BAUD_SET_ERROR;
+ }
+
+#if defined (PLIB_USART_ExistsModuleBusyStatus)
+ if (isEnabled)
+ {
+ PLIB_USART_Enable (USART_ID_2);
+ }
+#endif
+
+ return retVal;
+}
+
+
+DRV_USART_LINE_CONTROL_SET_RESULT DRV_USART0_LineControlSet(DRV_USART_LINE_CONTROL lineControlMode)
+{
+#if defined (PLIB_USART_ExistsModuleBusyStatus)
+ bool isEnabled = false;
+#endif
+#if defined (PLIB_USART_ExistsModuleBusyStatus)
+ isEnabled = PLIB_USART_ModuleIsBusy (USART_ID_2);
+ if (isEnabled)
+ {
+ PLIB_USART_Disable (USART_ID_2);
+ while (PLIB_USART_ModuleIsBusy (USART_ID_2));
+ }
+#endif
+
+ /* Set the Line Control Mode */
+ PLIB_USART_LineControlModeSelect(USART_ID_2, lineControlMode);
+
+#if defined (PLIB_USART_ExistsModuleBusyStatus)
+ if (isEnabled)
+ {
+ PLIB_USART_Enable (USART_ID_2);
+ }
+#endif
+
+ /* Return success */
+ return(DRV_USART_LINE_CONTROL_SET_SUCCESS);
+}
+
+/*******************************************************************************
+ End of File
+*/
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_byte_model.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_byte_model.c
new file mode 100644
index 00000000..c28d557b
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_byte_model.c
@@ -0,0 +1,113 @@
+/* clang-format off */
+/*******************************************************************************
+ USART driver static implementation of Byte model.
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_usart_static_byte_model.c
+
+ Summary:
+ Source code for the USART driver static implementation of Byte model.
+
+ Description:
+ This file contains the source code for the static implementation of the
+ USART driver Byte model.
+
+ Remarks:
+ Static interfaces incorporate the driver instance number within the names
+ of the routines, eliminating the need for an object ID or object handle.
+
+ Static single-open interfaces also eliminate the need for the open handle.
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+#include "system_config.h"
+#include "system_definitions.h"
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Global Data
+// *****************************************************************************
+// *****************************************************************************
+extern DRV_USART_OBJ gDrvUSART0Obj ;
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Instance 0 static driver functions
+// *****************************************************************************
+// *****************************************************************************
+
+uint8_t DRV_USART0_ReadByte(void)
+{
+ uint8_t readValue;
+
+ /* Receive one byte */
+ readValue = PLIB_USART_ReceiverByteReceive(USART_ID_2);
+
+ return readValue;
+}
+
+void DRV_USART0_WriteByte(const uint8_t byte)
+{
+ /* Wait till TX buffer is available as blocking operation is selected */
+ while(PLIB_USART_TransmitterBufferIsFull(USART_ID_2));
+ /* Send one byte */
+ PLIB_USART_TransmitterByteSend(USART_ID_2, byte);
+ SYS_INT_SourceEnable(INT_SOURCE_USART_2_TRANSMIT);
+}
+
+unsigned int DRV_USART0_ReceiverBufferSizeGet(void)
+{
+ return 8;
+}
+
+unsigned int DRV_USART0_TransmitBufferSizeGet(void)
+{
+ return 8;
+}
+
+bool DRV_USART0_ReceiverBufferIsEmpty( void )
+{
+ /* Check the status of receiver buffer */
+ return(!PLIB_USART_ReceiverDataIsAvailable(USART_ID_2));
+}
+
+bool DRV_USART0_TransmitBufferIsFull(void)
+{
+ /* Check the status of transmitter buffer */
+ return(PLIB_USART_TransmitterBufferIsFull(USART_ID_2));
+}
+
+/*******************************************************************************
+ End of File
+*/
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_local.h b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_local.h
new file mode 100644
index 00000000..9e7a29af
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_local.h
@@ -0,0 +1,114 @@
+/* clang-format off */
+/*******************************************************************************
+ USART Driver Local Data Structures for static implementation
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ drv_usart_static_local.h
+
+ Summary:
+ USART Driver Local Data Structures for static implementation
+
+ Description:
+ Driver Local Data Structures for static implementation
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute Software
+only when embedded on a Microchip microcontroller or digital signal controller
+that is integrated into your product or third party product (pursuant to the
+sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+#ifndef _DRV_USART_STATIC_LOCAL_H
+#define _DRV_USART_STATIC_LOCAL_H
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+
+#include
+#include
+#include
+#include "driver/usart/drv_usart.h"
+#include "driver/usart/src/drv_usart_variant_mapping.h"
+#include "system/clk/sys_clk.h"
+#include "system/int/sys_int.h"
+#include "system/debug/sys_debug.h"
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus // Provide C++ Compatibility
+
+ extern "C" {
+
+#endif
+// DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Data Type Definitions
+// *****************************************************************************
+// *****************************************************************************
+
+// *****************************************************************************
+/* USART Static Driver Instance Object
+
+ Summary:
+ Object used to keep any data required for the static USART driver.
+
+ Description:
+ This object is used to keep track of any data that must be maintained to
+ manage the USART static driver.
+
+ Remarks:
+ None.
+*/
+
+typedef struct
+{
+
+
+
+} DRV_USART_OBJ;
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Local functions.
+// *****************************************************************************
+// *****************************************************************************
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus
+}
+#endif
+// DOM-IGNORE-END
+
+#endif //#ifndef _DRV_USART_STATIC_LOCAL_H
+
+/*******************************************************************************
+ End of File
+*/
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/clk/src/sys_clk_static.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/clk/src/sys_clk_static.c
new file mode 100644
index 00000000..b1ab1cd8
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/clk/src/sys_clk_static.c
@@ -0,0 +1,294 @@
+/*******************************************************************************
+ SYS CLK Static Functions for Clock System Service
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ sys_clk_static.c
+
+ Summary:
+ SYS CLK static function implementations for the Clock System Service.
+
+ Description:
+ The Clock System Service provides a simple interface to manage the
+oscillators
+ on Microchip microcontrollers. This file defines the static implementation
+for the
+ Clock System Service.
+
+ Remarks:
+ Static functions incorporate all system clock configuration settings as
+ determined by the user via the Microchip Harmony Configurator GUI. It
+provides
+ static version of the routines, eliminating the need for an object ID or
+ object handle.
+
+ Static single-open interfaces also eliminate the need for the open handle.
+*******************************************************************************/
+
+// DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2014 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+// DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Include Files
+// *****************************************************************************
+// *****************************************************************************
+
+#include "system_config.h"
+#include "system_definitions.h"
+#include "peripheral/osc/plib_osc.h"
+#include "system/devcon/sys_devcon.h"
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: File Scope Functions
+// *****************************************************************************
+// *****************************************************************************
+
+// *****************************************************************************
+/* Function:
+ void SYS_CLK_Static_Initialize ( const SYS_CLK_INIT const * clkInit )
+
+ Summary:
+ Initializes hardware and internal data structure of the System Clock.
+
+ Description:
+ This function initializes the hardware and internal data structure of System
+ Clock Service.
+
+ Remarks:
+ This is configuration values for the static version of the Clock System
+ Service
+ module is determined by the user via the Microchip Harmony Configurator GUI.
+ This template will build a sys_clk_static.h and sys_clk_static.c file with
+ the configuration per the user's choice.
+
+ The objective is to eliminate the user's need to be knowledgeable in the
+ function of
+ the 'configuration bits' to configure the system oscillators.
+*/
+
+void SYS_CLK_Initialize(const SYS_CLK_INIT const *clkInit) {
+ SYS_DEVCON_SystemUnlock();
+
+ PLIB_OSC_FRCDivisorSelect(OSC_ID_0, OSC_FRC_DIV_2);
+
+ /* Enable Peripheral Bus 1 */
+ PLIB_OSC_PBClockDivisorSet(OSC_ID_0, 0, 1);
+
+ SYS_DEVCON_SystemLock();
+}
+
+//******************************************************************************
+/* Function:
+ inline uint32_t SYS_CLK_SystemFrequencyGet ( void )
+
+ Summary:
+ Gets the system clock frequency in Hertz.
+
+ Description:
+ This function gets the System clock frequency in Hertz.
+
+ Precondition:
+ None.
+
+ Parameters:
+ None.
+
+ Returns:
+ System clock frequency in Hertz.
+
+ Example:
+
+ uint32_t sysClockHz;
+
+ sysClockHz = SYS_CLK_SystemFrequencyGet ( );
+
+
+ Remarks:
+ */
+
+inline uint32_t SYS_CLK_SystemFrequencyGet(void) {
+ return SYS_CLK_FREQ;
+}
+
+//******************************************************************************
+/* Function:
+ inline uint32_t SYS_CLK_PeripheralFrequencyGet ( CLK_BUSES_PERIPHERAL
+ peripheralBus )
+
+ Summary:
+ Gets the selected clock peripheral bus frequency in Hertz.
+
+ Description:
+ This function gets the selected peripheral bus clock frequency in Hertz.
+
+ Precondition:
+ None.
+
+ Parameters:
+ peripheralBus - Reference clock bus selection. One of the possible value
+ from
+ CLK_BUSES_PERIPHERAL enum. For devices that do
+ not have multiple
+ clock channels for Reference clock,
+ CLK_BUS_PERIPHERAL_1 should be
+ the selection.
+
+ Returns:
+ Clock frequency in Hertz.
+
+ Example:
+
+ unsigned long peripheralClockHz;
+
+ peripheralClockHz = SYS_CLK_PeripheralFrequencyGet ( CLK_BUS_PERIPHERAL_5 );
+
+
+ Remarks:
+ Most of the devices doesn't have multiple Peripheral clock buses. In
+ that case,
+ pass CLK_USB_PERIPHERAL_1 as the bus number.
+ */
+
+inline uint32_t SYS_CLK_PeripheralFrequencyGet(
+ CLK_BUSES_PERIPHERAL peripheralBus) {
+ return SYS_CLK_BUS_PERIPHERAL_1;
+}
+
+//******************************************************************************
+/* Function:
+ inline uint32_t SYS_CLK_ReferenceClockFrequencyGet ( CLK_BUSES_REFERENCE
+ referenceBus )
+
+ Summary:
+ Gets the selected Reference clock bus frequency in Hertz.
+
+ Description:
+ This function gets frequency of the selected Reference clock bus in Hertz.
+
+ Precondition:
+ None.
+
+ Parameters:
+ peripheralBus - Reference clock bus selection. One of the possible value
+ from
+ CLK_BUSES_REFERENCE enum. For devices that do
+ not have multiple
+ clock channels for Reference clock,
+ CLK_BUS_REFERENCE_1 should be
+ the selection.
+
+ Returns:
+ Clock frequency in Hz.
+
+ Example:
+
+ unsigned long sysClockOutputHz;
+
+ sysClockOutputHz = SYS_CLK_ReferenceClockFrequencyGet ( CLK_BUS_REFERENCE_3
+ );
+
+
+ Remarks:
+ */
+
+inline uint32_t SYS_CLK_ReferenceClockFrequencyGet(
+ CLK_BUSES_REFERENCE referenceBus) {
+ return 0;
+}
+
+/******************************************************************************
+ Function:
+ void SYS_CLK_SecondaryOscillatorEnable ( void )
+
+ Summary:
+ Enables the secondary oscillator.
+
+ Description:
+ This function enables the secondary oscillator.
+
+ Remarks:
+ For more details refer sys_clk.h.
+*/
+
+void SYS_CLK_SecondaryOscillatorEnable(void) {
+ /* Check for secondary oscillator status */
+ if (!PLIB_OSC_SecondaryIsEnabled(OSC_ID_0)) {
+ /* Unlock and enable secondary oscillator */
+ SYS_DEVCON_SystemUnlock();
+
+ PLIB_OSC_SecondaryEnable(OSC_ID_0);
+
+ SYS_DEVCON_SystemLock();
+ }
+}
+
+/******************************************************************************
+ Function:
+ void SYS_CLK_SecondaryOscillatorDisable ( void )
+
+ Summary:
+ Disables the secondary oscillator.
+
+ Description:
+ This function disables the secondary oscillator.
+
+ Remarks:
+ For more details refer sys_clk.h.
+*/
+
+void SYS_CLK_SecondaryOscillatorDisable(void) {
+ /* Check for secondary oscillator status */
+ if (PLIB_OSC_SecondaryIsEnabled(OSC_ID_0)) {
+ /* Unlock and disable secondary oscillator*/
+ SYS_DEVCON_SystemUnlock();
+
+ PLIB_OSC_SecondaryDisable(OSC_ID_0);
+
+ SYS_DEVCON_SystemLock();
+ }
+}
+
+/******************************************************************************
+ Function:
+ bool SYS_CLK_SecondaryOscillatorIsEnabled ( void )
+
+ Summary:
+ Identifies whether secondary oscillator is enabled or disabled.
+
+ Description:
+ This function identifies whether the secondary oscillator is enabled or
+ disabled.
+
+ Remarks:
+ For more details refer sys_clk.h.
+*/
+
+bool SYS_CLK_SecondaryOscillatorIsEnabled(void) {
+ return (PLIB_OSC_SecondaryIsEnabled(OSC_ID_0));
+}
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/clk/sys_clk_static.h b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/clk/sys_clk_static.h
new file mode 100644
index 00000000..6ad82f1b
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/clk/sys_clk_static.h
@@ -0,0 +1,82 @@
+/* clang-format off */
+/*******************************************************************************
+ SYS CLK Static Interface Declarations for Clock System Service
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ sys_clk_static.h
+
+ Summary:
+ SYS CLK interface declarations for the static system service.
+
+ Description:
+ The Clock System Service provides a simple interface to manage the oscillators
+ on Microchip microcontrollers. This file defines the interface
+ Declarations for the SYS CLK system service.
+
+ Remarks:
+ Static interfaces incorporate all system clock configuration settings as
+ determined by the user via the Microchip Harmony Configurator GUI. It provides
+ static version of the routines, eliminating the need for an object ID or
+ object handle.
+
+ Static single-open interfaces also eliminate the need for the open handle.
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2014 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus // Provide C++ Compatibility
+
+ extern "C" {
+
+#endif
+// DOM-IGNORE-END
+
+
+#ifndef _SYS_CLK_STATIC_H
+#define _SYS_CLK_STATIC_H
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: SYS CLK Module Initialization Routine (Static Version)
+// *****************************************************************************
+// *****************************************************************************
+
+#endif // #ifndef _SYS_CLK_STATIC_H
+
+//DOM-IGNORE-BEGIN
+#ifdef __cplusplus
+}
+#endif
+//DOM-IGNORE-END
+
+
+/*******************************************************************************
+ End of File
+*/
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/console/src/sys_console_static.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/console/src/sys_console_static.c
new file mode 100644
index 00000000..8007128c
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/console/src/sys_console_static.c
@@ -0,0 +1,387 @@
+/* clang-format off */
+/*******************************************************************************
+ SYS CONSOLE Static Functions for Console System Service
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ sys_console_static.c
+
+ Summary:
+ SYS CONSOLE static function implementations for the Console System Service.
+
+ Description:
+ The Console System Service provides a simple interface to manage the oscillators
+ on Microchip microcontrollers. This file defines the static implementation for the
+ Console System Service.
+
+ Remarks:
+ Static functions incorporate all system clock configuration settings as
+ determined by the user via the Microchip Harmony Configurator GUI. It provides
+ static version of the routines, eliminating the need for an object ID or
+ object handle.
+
+ Static single-open interfaces also eliminate the need for the open handle.
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2014 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Include Files
+// *****************************************************************************
+// *****************************************************************************
+
+#include "system_config.h"
+#include "system_definitions.h"
+#include "system/console/sys_console.h"
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Global Variable Definitions
+// *****************************************************************************
+// *****************************************************************************
+
+
+// *****************************************************************************
+/* Function:
+ SYS_MODULE_OBJ SYS_CONSOLE_Initialize( const SYS_MODULE_INDEX index,
+ const SYS_MODULE_INIT * const init )
+
+ Summary:
+ Initializes data for the instance of the Console module and opens the
+ specific module instance.
+
+ Description:
+ This function initializes the Console module, and selects the I/O device to
+ be used. It also initializes any internal data structures.
+
+ Precondition:
+ None.
+
+ Parameters:
+ index - Index for the instance to be initialized
+
+ init - Pointer to a data structure containing any data necessary
+ to initialize the sys console. This pointer may be null if no
+ data is required because static overrides have been
+ provided.
+
+ Returns:
+ If successful, returns a valid handle to an object. Otherwise, it
+ returns SYS_MODULE_OBJ_INVALID. The returned object must be passed as
+ argument to SYS_CONSOLE_Reinitialize, SYS_CONSOLE_Deinitialize,
+ SYS_CONSOLE_Tasks and SYS_CONSOLE_Status routines.
+
+ Remarks:
+ This routine should only be called once during system initialization
+ unless SYS_Console_Deinitialize is first called to deinitialize the device
+ instance before reinitializing it. If the system was already initialized
+ it safely returns without causing any disturbance.
+*/
+
+SYS_MODULE_OBJ SYS_CONSOLE_Initialize( const SYS_MODULE_INDEX index, const SYS_MODULE_INIT * const init )
+{
+ return 1;
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_CONSOLE_Reinitialize ( SYS_MODULE_OBJ object,
+ const SYS_MODULE_INIT * const init )
+
+ Summary:
+ Reinitializes and refreshes the data structure for the instance of the
+ Console module.
+
+ Description:
+ This function reinitializes and refreshes the data structure for the
+ instance of the Console module.
+
+ PreCondition:
+ The SYS_CONSOLE_Initialize function should have been called before calling
+ this function.
+
+ Parameters:
+ object - Identifies the SYS CONSOLE Object returned by the Initialize
+ interface
+ init - Pointer to the data structure containing any data
+ necessary to initialize the hardware
+
+ Returns:
+ - true - if successful
+ - false - if unsuccessful
+*/
+
+bool SYS_CONSOLE_Reinitialize( SYS_MODULE_OBJ object, const SYS_MODULE_INIT * const init )
+{
+ return true;
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_CONSOLE_Deinitialize ( SYS_MODULE_OBJ object )
+
+ Summary:
+ Deinitializes the specific module instance of the Console module.
+
+ Description:
+ Deinitializes the specific module instance disabling its operation (and
+ any hardware for driver modules). Resets all the internal data
+ structures and fields for the specified instance to the default
+ settings.
+
+ PreCondition:
+ The SYS_CONSOLE_Initialize function should have been called before calling
+ this function.
+
+ Parameters:
+ object - SYS CONSOLE object handle, returned from SYS_CONSOLE_Initialize
+
+ Returns:
+ - true - if successful
+ - false - if unsuccessful
+*/
+
+bool SYS_CONSOLE_Deinitialize ( SYS_MODULE_OBJ object )
+{
+ return true;
+}
+
+
+// *****************************************************************************
+/* Function:
+ SYS_STATUS SYS_CONSOLE_Status ( SYS_MODULE_OBJ object )
+
+ Summary:
+ Returns status of the specific module instance of the Console module.
+
+ Description:
+ This function returns the status of the specific module instance disabling its
+ operation (and any hardware for driver modules).
+
+ PreCondition:
+ The SYS_CONSOLE_Initialize function should have been called before calling
+ this function.
+
+ Parameters:
+ object - SYS CONSOLE object handle, returned from SYS_CONSOLE_Initialize
+
+ Returns:
+ SYS_STATUS_READY Indicates that any previous module operation for the
+ specified module has completed
+
+ SYS_STATUS_BUSY Indicates that a previous module operation for the
+ specified module has not yet completed
+
+ SYS_STATUS_ERROR Indicates that the specified module is in an error state
+*/
+
+SYS_STATUS SYS_CONSOLE_Status ( SYS_MODULE_OBJ object )
+{
+ return SYS_STATUS_READY;
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_CONSOLE_Tasks ( SYS_MODULE_OBJ object )
+
+ Summary:
+ Maintains the system console's state machine and implements its ISR.
+
+ Description:
+ This routine is used to maintain the system console's internal state machine
+ and implement its ISR for interrupt-driven implementations.
+
+ Precondition:
+ The SYS_CONSOLE_Initialize function must have been called for the specified
+ console instance.
+
+ Parameters:
+ object - SYS CONSOLE object handle, returned from SYS_CONSOLE_Initialize
+
+ Returns:
+ None.
+*/
+
+void SYS_CONSOLE_Tasks ( SYS_MODULE_OBJ object )
+{
+}
+
+// *****************************************************************************
+/* Function:
+ ssize_t SYS_CONSOLE_Read( const SYS_MODULE_INDEX index, int fd, void *buf, size_t count )
+
+ Summary:
+ Reads data from the console device.
+
+ Description:
+ This function reads the data from the console device.
+
+ Preconditions:
+ None.
+
+ Parameters:
+ index - Console instance index
+ fd - This field is not used
+ Maintained for backward compatibility
+ NULL value can be passed as a parameter
+ buf - Buffer to hold the read data.
+ count - Number of bytes to read.
+
+ Returns:
+ Number of bytes actually read.
+
+ Remarks:
+ None.
+*/
+
+ssize_t SYS_CONSOLE_Read(const SYS_MODULE_INDEX index, int fd, void *buf, size_t count )
+{
+ size_t numBytes = 0;
+ char* pReadByte = (char*)buf;
+ if( !DRV_USART0_ReceiverBufferIsEmpty() )
+ {
+ *pReadByte = DRV_USART0_ReadByte();
+
+ numBytes++;
+ pReadByte++;
+ }
+
+ return numBytes;
+}
+
+
+// *****************************************************************************
+/* Function:
+ ssize_t SYS_CONSOLE_Write( const SYS_MODULE_INDEX index, int fd, const void *buffer, size_t count )
+
+ Summary:
+ Writes data to the console device.
+
+ Description:
+ This function writes data to the console device.
+
+ Preconditions:
+ None.
+
+ Parameters:
+ index - Console instance index
+ fd - This field is not used
+ Maintained for backward compatibility
+ NULL value can be passed as a parameter
+ buf - Buffer holding the data to be written.
+ count - Number of bytes to write.
+
+ Returns:
+ Number of bytes written or -1 if error.
+
+ Remarks:
+ None.
+*/
+
+ssize_t SYS_CONSOLE_Write(const SYS_MODULE_INDEX index, int fd, const char *buf, size_t count )
+{
+ size_t numBytes = 0;
+ while( numBytes < count )
+ {
+ DRV_USART0_WriteByte(buf[numBytes++]);
+ }
+ return count;
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_CONSOLE_RegisterCallback(const SYS_MODULE_INDEX index, consoleCallbackFunction cbFunc, SYS_CONSOLE_EVENT event)
+
+ Summary:
+ Registers a callback function with the console service that will be
+ executed when the read or write queue is emptied.
+
+ Description:
+ This function is used by an application to register a callback function
+ with the console service. The callback function is called in response to
+ an event. Separate callback functions are required for each event.
+
+ Preconditions:
+ None.
+
+ Parameters:
+ index - Console instance index
+ consCallbackFunc - The name of the callback function
+ event - Enumerated list of events that can trigger a callback
+
+ Returns:
+ None.
+
+ Remarks:
+ None.
+*/
+
+void SYS_CONSOLE_RegisterCallback(const SYS_MODULE_INDEX index, consoleCallbackFunction cbFunc, SYS_CONSOLE_EVENT event)
+{
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_CONSOLE_Flush(const SYS_MODULE_INDEX index)
+
+ Summary:
+ Flushes the read and write queues and resets an overflow error for the
+ console.
+
+ Description:
+ This function flushes the read and write queues and resets an overflow
+ error for the console.
+
+ Preconditions:
+ None.
+
+ Parameters:
+ index - Console instance index
+
+ Returns:
+ None.
+
+ Remarks:
+ None.
+*/
+
+void SYS_CONSOLE_Flush(const SYS_MODULE_INDEX index)
+{
+}
+
+
+/*******************************************************************************
+ End of File
+*/
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/ports/src/sys_ports_static.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/ports/src/sys_ports_static.c
new file mode 100644
index 00000000..c96b8568
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework/system/ports/src/sys_ports_static.c
@@ -0,0 +1,872 @@
+/* clang-format off */
+/*******************************************************************************
+ SYS PORTS Static Functions for PORTS System Service
+
+ Company:
+ Microchip Technology Inc.
+
+ File Name:
+ sys_ports_static.c
+
+ Summary:
+ SYS PORTS static function implementations for the Ports System Service.
+
+ Description:
+ The Ports System Service provides a simple interface to manage the ports
+ on Microchip microcontrollers. This file defines the static implementation for the
+ Ports System Service.
+
+ Remarks:
+ Static functions incorporate all system ports configuration settings as
+ determined by the user via the Microchip Harmony Configurator GUI. It provides
+ static version of the routines, eliminating the need for an object ID or
+ object handle.
+
+*******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2013 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+//DOM-IGNORE-END
+
+#include "system_config.h"
+#include "system/ports/sys_ports.h"
+#include "peripheral/devcon/plib_devcon.h"
+#include "peripheral/ports/plib_ports.h"
+#include "peripheral/int/plib_int.h"
+
+/******************************************************************************
+ Function:
+ SYS_PORTS_Initialize(void)
+
+ Summary:
+ Initializes Ports System Service
+
+ Description:
+ This function initializes different port pins/channels to the desired state.
+ It also remaps the pins to the desired specific function.
+
+ Remarks:
+ None.
+*/
+void SYS_PORTS_Initialize(void)
+{
+ /* AN and CN Pins Initialization */
+ PLIB_PORTS_AnPinsModeSelect(PORTS_ID_0, SYS_PORT_AD1PCFG, PORTS_PIN_MODE_DIGITAL);
+ PLIB_PORTS_CnPinsPullUpEnable(PORTS_ID_0, SYS_PORT_CNPUE);
+ PLIB_PORTS_CnPinsEnable(PORTS_ID_0, SYS_PORT_CNEN);
+ PLIB_PORTS_ChangeNoticeEnable(PORTS_ID_0);
+
+ PLIB_PORTS_Read(PORTS_ID_0, PORT_CHANNEL_D);
+ PLIB_INT_SourceFlagClear(INT_ID_0, INT_SOURCE_CHANGE_NOTICE);
+ PLIB_INT_SourceEnable(INT_ID_0, INT_SOURCE_CHANGE_NOTICE);
+ PLIB_INT_VectorPrioritySet(INT_ID_0, INT_VECTOR_CN, INT_PRIORITY_LEVEL2);
+ PLIB_INT_VectorSubPrioritySet(INT_ID_0, INT_VECTOR_CN, INT_SUBPRIORITY_LEVEL0);
+
+
+ /* PORT D Initialization */
+ PLIB_PORTS_OpenDrainEnable(PORTS_ID_0, PORT_CHANNEL_D, SYS_PORT_D_ODC);
+ PLIB_PORTS_Write( PORTS_ID_0, PORT_CHANNEL_D, SYS_PORT_D_LAT);
+ PLIB_PORTS_DirectionOutputSet( PORTS_ID_0, PORT_CHANNEL_D, SYS_PORT_D_TRIS ^ 0xFFFF);
+
+}
+
+/******************************************************************************
+ Function:
+ PORTS_DATA_TYPE SYS_PORTS_Read( PORTS_MODULE_ID index, PORTS_CHANNEL channel )
+
+ Summary:
+ Reads the data from the I/O port.
+
+ Description:
+ This function reads the data from the I/O port.
+
+ Remarks:
+ None.
+*/
+
+PORTS_DATA_TYPE SYS_PORTS_Read( PORTS_MODULE_ID index, PORTS_CHANNEL channel )
+{
+ return PLIB_PORTS_Read( index, channel );
+}
+
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_Write( PORTS_MODULE_ID index, PORTS_CHANNEL channel,
+ PORTS_DATA_TYPE value )
+
+ Summary:
+ Writes the data from the I/O port.
+
+ Description:
+ This function writes the data to the I/O port.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_Write( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_DATA_TYPE value )
+{
+ PLIB_PORTS_Write( index, channel, value );
+}
+
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_Set( PORTS_MODULE_ID index, PORTS_CHANNEL channel,
+ PORTS_DATA_TYPE value,
+ PORTS_DATA_MASK mask )
+
+ Summary:
+ Sets the selected digital port/latch based on the mask.
+
+ Description:
+ This function sets the selected digital port/latch relative to the mask.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_Set( PORTS_MODULE_ID index, PORTS_CHANNEL channel,
+ PORTS_DATA_TYPE value,
+ PORTS_DATA_MASK mask )
+{
+ PLIB_PORTS_Set( index, channel, value, mask );
+}
+
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_Clear ( PORTS_MODULE_ID index, PORTS_CHANNEL channel,
+ PORTS_DATA_MASK clearMask )
+
+ Summary:
+ Clears the selected digital port.
+
+ Description:
+ This function clears the selected digital port.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_Clear ( PORTS_MODULE_ID index, PORTS_CHANNEL channel,
+ PORTS_DATA_MASK clearMask )
+{
+ PLIB_PORTS_Clear ( index, channel, clearMask );
+}
+
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_DirectionSelect( PORTS_MODULE_ID index,
+ SYS_PORTS_PIN_DIRECTION pinDir,
+ PORTS_CHANNEL channel,
+ PORTS_DATA_MASK mask )
+ Summary:
+ Enables the direction for the selected port.
+
+ Description:
+ This function enables the direction for the selected port.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_DirectionSelect( PORTS_MODULE_ID index,
+ SYS_PORTS_PIN_DIRECTION pinDir,
+ PORTS_CHANNEL channel,
+ PORTS_DATA_MASK mask )
+{
+ if (pinDir == SYS_PORTS_DIRECTION_INPUT)
+ {
+ PLIB_PORTS_DirectionInputSet(index, channel, mask);
+ }
+ else
+ {
+ PLIB_PORTS_DirectionOutputSet(index, channel, mask);
+ }
+}
+
+
+/******************************************************************************
+ Function:
+ PORTS_DATA_MASK SYS_PORTS_DirectionGet( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel )
+
+ Summary:
+ Reads the port direction for the selected port.
+
+ Description:
+ This function reads the port direction for the selected port.
+
+ Remarks:
+ None.
+*/
+
+PORTS_DATA_MASK SYS_PORTS_DirectionGet( PORTS_MODULE_ID index, PORTS_CHANNEL channel )
+{
+ return PLIB_PORTS_DirectionGet( index, channel );
+}
+
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_Toggle( PORTS_MODULE_ID index, PORTS_CHANNEL channel,
+ PORTS_DATA_MASK toggleMask )
+
+ Summary:
+ Toggles the selected digital port pins.
+
+ Description:
+ This function toggles the selected digital port pins.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_Toggle( PORTS_MODULE_ID index, PORTS_CHANNEL channel,
+ PORTS_DATA_MASK toggleMask )
+{
+ PLIB_PORTS_Toggle( index, channel, toggleMask );
+}
+
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_OpenDrainEnable( PORTS_MODULE_ID index, PORTS_CHANNEL channel,
+ PORTS_DATA_MASK mask )
+
+ Summary:
+ Enables the open drain functionality for the selected port.
+
+ Description:
+ This function enables the open drain functionality for the selected port.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_OpenDrainEnable( PORTS_MODULE_ID index, PORTS_CHANNEL channel,
+ PORTS_DATA_MASK mask )
+{
+#if defined(PLIB_PORTS_ExistsPortsOpenDrain)
+ if(PLIB_PORTS_ExistsPortsOpenDrain(index))
+ {
+ PLIB_PORTS_OpenDrainEnable( index, channel, mask );
+ }
+#endif
+}
+
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_OpenDrainDisable( PORTS_MODULE_ID index, PORTS_CHANNEL channel,
+ PORTS_DATA_MASK mask )
+
+ Summary:
+ Disables the open drain functionality for the selected port.
+
+ Description:
+ This function disables the open drain functionality for the selected port.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_OpenDrainDisable( PORTS_MODULE_ID index, PORTS_CHANNEL channel,
+ PORTS_DATA_MASK mask )
+{
+#if defined(PLIB_PORTS_ExistsPortsOpenDrain)
+ if(PLIB_PORTS_ExistsPortsOpenDrain(index))
+ {
+ PLIB_PORTS_OpenDrainDisable( index, channel, mask );
+ }
+#endif
+}
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: SYS Change Notification Pins Routines
+// *****************************************************************************
+// *****************************************************************************
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_ChangeNotificationGlobalEnable( PORTS_MODULE_ID index )
+
+ Summary:
+ Globally enables the change notification.
+
+ Description:
+ This function globally enables the change notification.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_ChangeNotificationGlobalEnable( PORTS_MODULE_ID index )
+{
+#if defined(PLIB_PORTS_ExistsChangeNotice)
+ if(PLIB_PORTS_ExistsChangeNotice(index))
+ {
+ PLIB_PORTS_ChangeNoticeEnable( index );
+ }
+#endif
+}
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_ChangeNotificationGlobalDisable( PORTS_MODULE_ID index )
+
+ Summary:
+ Globally disables the change notification.
+
+ Description:
+ This function globally disables the change notification.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_ChangeNotificationGlobalDisable( PORTS_MODULE_ID index )
+{
+#if defined(PLIB_PORTS_ExistsChangeNotice)
+ if(PLIB_PORTS_ExistsChangeNotice(index))
+ {
+ PLIB_PORTS_ChangeNoticeDisable( index );
+ }
+#endif
+}
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_GlobalChangeNotificationDisable( PORTS_MODULE_ID index )
+
+ Summary:
+ Globally disables the change notification for the selected port.
+
+ Description:
+ This function globally disables the change notification for the selected port.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_GlobalChangeNotificationDisable( PORTS_MODULE_ID index )
+{
+#if defined(PLIB_PORTS_ExistsChangeNotice)
+ if(PLIB_PORTS_ExistsChangeNotice(index))
+ {
+ PLIB_PORTS_ChangeNoticeDisable( index );
+ }
+#endif
+}
+
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_ChangeNotificationEnable( PORTS_MODULE_ID index,
+ PORTS_CHANGE_NOTICE_PIN pinNum,
+ SYS_PORTS_PULLUP_PULLDOWN_STATUS value )
+
+ Summary:
+ Enables the change notification for the selected port.
+
+ Description:
+ This function enables the change notification for the selected port.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_ChangeNotificationEnable( PORTS_MODULE_ID index,
+ PORTS_CHANGE_NOTICE_PIN pinNum,
+ SYS_PORTS_PULLUP_PULLDOWN_STATUS value )
+{
+#if defined(PLIB_PORTS_ExistsChangeNoticePullUp)
+ if(PLIB_PORTS_ExistsChangeNoticePullUp(index))
+ {
+ switch(value)
+ {
+ case SYS_PORTS_PULLUP_DISABLE:
+ PLIB_PORTS_ChangeNoticePullUpDisable(index, pinNum);
+ break;
+ case SYS_PORTS_PULLUP_ENABLE:
+ PLIB_PORTS_ChangeNoticePullUpEnable(index, pinNum);
+ break;
+ }
+ }
+#endif
+
+#if defined(PLIB_PORTS_ExistsPinChangeNotice)
+ if(PLIB_PORTS_ExistsPinChangeNotice(index))
+ {
+ PLIB_PORTS_PinChangeNoticeEnable( index, pinNum );
+ }
+#endif
+}
+
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_ChangeNotificationDisable( PORTS_MODULE_ID index,
+ PORTS_CHANGE_NOTICE_PIN pinNum )
+
+ Summary:
+ Disables the change notification for the selected port.
+
+ Description:
+ This function disables the change notification for the selected port.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_ChangeNotificationDisable( PORTS_MODULE_ID index,
+ PORTS_CHANGE_NOTICE_PIN pinNum )
+{
+#if defined(PLIB_PORTS_ExistsPinChangeNotice)
+ if(PLIB_PORTS_ExistsPinChangeNotice(index))
+ {
+ PLIB_PORTS_PinChangeNoticeDisable( index, pinNum );
+ }
+#endif
+}
+
+
+/******************************************************************************
+ Function:
+ void SYS_PORTS_ChangeNotificationInIdleModeEnable( PORTS_MODULE_ID index )
+
+ Summary:
+ Enables the change notification for the selected port in Sleep or Idle mode.
+
+ Description:
+ This function enables the change notification for the selected port in Sleep
+ or Idle mode.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_ChangeNotificationInIdleModeEnable( PORTS_MODULE_ID index )
+{
+#if defined(PLIB_PORTS_ExistsChangeNoticeInIdle)
+ if(PLIB_PORTS_ExistsChangeNoticeInIdle(index))
+ {
+ PLIB_PORTS_ChangeNoticeInIdleEnable( index );
+ }
+#endif
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_ChangeNotificationInIdleModeDisable( PORTS_MODULE_ID index)
+
+ Summary:
+ Disables the change notification for the selected port in Sleep or Idle mode.
+
+ Description:
+ This function disables the change notification for the selected port in Sleep
+ or Idle mode.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_ChangeNotificationInIdleModeDisable( PORTS_MODULE_ID index )
+{
+#if defined(PLIB_PORTS_ExistsChangeNoticeInIdle)
+ if(PLIB_PORTS_ExistsChangeNoticeInIdle(index))
+ {
+ PLIB_PORTS_ChangeNoticeInIdleDisable( index );
+ }
+#endif
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_ChangeNotificationPullUpEnable ( PORTS_MODULE_ID index,
+ PORTS_CHANGE_NOTICE_PIN pinNum )
+
+ Summary:
+ Enables weak pull-up on change notification pin.
+
+ Description:
+ This function enables weak pull-up on change notification pin.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_ChangeNotificationPullUpEnable ( PORTS_MODULE_ID index,
+ PORTS_CHANGE_NOTICE_PIN pinNum )
+{
+#if defined(PLIB_PORTS_ExistsChangeNoticePullUp)
+ if(PLIB_PORTS_ExistsChangeNoticePullUp(index))
+ {
+ PLIB_PORTS_ChangeNoticePullUpEnable ( index, pinNum );
+ }
+#endif
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_ChangeNotificationPullUpDisable ( PORTS_MODULE_ID index,
+ PORTS_CHANGE_NOTICE_PIN pinNum )
+
+ Summary:
+ Disables pull-up on input change.
+
+ Description:
+ This function disables pull-up on input change.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_ChangeNotificationPullUpDisable ( PORTS_MODULE_ID index,
+ PORTS_CHANGE_NOTICE_PIN pinNum )
+{
+#if defined(PLIB_PORTS_ExistsChangeNoticePullUp)
+ if(PLIB_PORTS_ExistsChangeNoticePullUp(index))
+ {
+ PLIB_PORTS_ChangeNoticePullUpDisable ( index, pinNum );
+ }
+#endif
+}
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: SYS PORT PINS Control Routines
+// *****************************************************************************
+// *****************************************************************************
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_PinModeSelect ( PORTS_MODULE_ID index, PORTS_ANALOG_PIN pin,
+ PORTS_PIN_MODE mode)
+
+ Summary:
+ Enables the selected pin as analog or digital.
+
+ Description:
+ This function enables the selected pin as analog or digital.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_PinModeSelect ( PORTS_MODULE_ID index, PORTS_ANALOG_PIN pin,
+ PORTS_PIN_MODE mode)
+{
+#if defined(PLIB_PORTS_ExistsPinMode)
+ if(PLIB_PORTS_ExistsPinMode(index))
+ {
+ PLIB_PORTS_PinModeSelect ( index, pin, mode);
+ }
+#endif
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_PinWrite ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos
+ bool value )
+ Summary:
+ Writes the selected digital pin.
+
+ Description:
+ This function writes the selected digital pin.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_PinWrite ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos,
+ bool value )
+{
+ PLIB_PORTS_PinWrite ( index, channel, bitPos, value );
+}
+
+
+// *****************************************************************************
+/* Function:
+ bool SYS_PORTS_PinRead ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+
+ Summary:
+ Reads the selected digital pin.
+
+ Description:
+ This function reads the selected digital pin.
+
+ Remarks:
+ None.
+*/
+
+bool SYS_PORTS_PinRead ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+{
+ return PLIB_PORTS_PinGet ( index, channel, bitPos );
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_PinToggle ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+
+ Summary:
+ Toggles the selected digital pin.
+
+ Description:
+ This function toggles the selected digital pin.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_PinToggle ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+{
+ PLIB_PORTS_PinToggle ( index, channel, bitPos );
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_PinSet( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+
+ Summary:
+ Sets the selected digital pin/latch.
+
+ Description:
+ This function sets the selected digital pin/latch.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_PinSet( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+{
+ PLIB_PORTS_PinSet( index, channel, bitPos );
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_PinClear ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+
+ Summary:
+ Clears the selected digital pin.
+
+ Description:
+ This function clears the selected digital pin.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_PinClear ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+{
+ PLIB_PORTS_PinClear ( index, channel, bitPos );
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_PinDirectionSelect ( PORTS_MODULE_ID index,
+ SYS_PORTS_PIN_DIRECTION pinDir,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+ Summary:
+ Enables the direction for the selected pin.
+
+ Description:
+ This function enables the direction for the selected pin.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_PinDirectionSelect ( PORTS_MODULE_ID index,
+ SYS_PORTS_PIN_DIRECTION pinDir,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+{
+ if (pinDir == SYS_PORTS_DIRECTION_OUTPUT)
+ {
+ PLIB_PORTS_PinDirectionOutputSet(index, channel, bitPos);
+ }
+ else
+ {
+ PLIB_PORTS_PinDirectionInputSet(index, channel, bitPos);
+ }
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_PinOpenDrainEnable ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+
+ Summary:
+ Enables the open-drain functionality for the selected pin.
+
+ Description:
+ This function enables the open-drain functionality for the selected pin.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_PinOpenDrainEnable ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+{
+#if defined(PLIB_PORTS_ExistsPortsOpenDrain)
+ if(PLIB_PORTS_ExistsPortsOpenDrain(index))
+ {
+ PLIB_PORTS_PinOpenDrainEnable ( index, channel, bitPos );
+ }
+#endif
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_PinOpenDrainDisable ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+
+ Summary:
+ Disables the open-drain functionality for the selected pin.
+
+ Description:
+ This function disables the open-drain functionality for the selected pin.
+
+ Remarks:
+ None.
+*/
+
+void SYS_PORTS_PinOpenDrainDisable ( PORTS_MODULE_ID index,
+ PORTS_CHANNEL channel,
+ PORTS_BIT_POS bitPos )
+{
+#if defined(PLIB_PORTS_ExistsPortsOpenDrain)
+ if(PLIB_PORTS_ExistsPortsOpenDrain(index))
+ {
+ PLIB_PORTS_PinOpenDrainDisable ( index, channel, bitPos );
+ }
+#endif
+}
+
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_RemapInput( PORTS_MODULE_ID index,
+ PORTS_REMAP_INPUT_FUNCTION function,
+ PORTS_REMAP_INPUT_PIN remapPin )
+
+ Summary:
+ Input/Output (I/O) function remapping.
+
+ Description:
+ This function controls the I/O function remapping.
+
+ Precondition:
+ None.
+*/
+void SYS_PORTS_RemapInput( PORTS_MODULE_ID index,
+ PORTS_REMAP_INPUT_FUNCTION function,
+ PORTS_REMAP_INPUT_PIN remapPin )
+{
+#if defined(PLIB_PORTS_ExistsRemapInput)
+ if(PLIB_PORTS_ExistsRemapInput(index))
+ {
+ PLIB_DEVCON_SystemUnlock(DEVCON_ID_0);
+ PLIB_DEVCON_DeviceRegistersUnlock(DEVCON_ID_0, DEVCON_PPS_REGISTERS);
+ PLIB_PORTS_RemapInput( index, function, remapPin);
+ }
+#endif
+}
+
+// *****************************************************************************
+/* Function:
+ void SYS_PORTS_RemapOutput( PORTS_MODULE_ID index,
+ PORTS_REMAP_OUTPUT_FUNCTION function,
+ PORTS_REMAP_OUTPUT_PIN remapPin )
+
+ Summary:
+ Input/Output (I/O) function remapping.
+
+ Description:
+ This function controls the I/O function remapping.
+
+ Precondition:
+ None.
+*/
+void SYS_PORTS_RemapOutput( PORTS_MODULE_ID index,
+ PORTS_REMAP_OUTPUT_FUNCTION function,
+ PORTS_REMAP_OUTPUT_PIN remapPin )
+{
+#if defined(PLIB_PORTS_ExistsRemapOutput)
+ if(PLIB_PORTS_ExistsRemapOutput(index))
+ {
+ PLIB_DEVCON_SystemUnlock(DEVCON_ID_0);
+ PLIB_DEVCON_DeviceRegistersUnlock(DEVCON_ID_0, DEVCON_PPS_REGISTERS);
+ PLIB_PORTS_RemapOutput( index, function, remapPin);
+ }
+#endif
+}
+
+/*******************************************************************************
+ End of File
+*/
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/mx795.mhc b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/mx795.mhc
new file mode 100644
index 00000000..58f48806
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/mx795.mhc
@@ -0,0 +1,507 @@
+#
+# Configuration generated by Microchip Harmony Configurator (MHC) v1.0.8.7
+# Project name: mqtt_client
+# Configuration: mx795_CC3100_e16
+# Device: PIC32MX795F512L
+# Harmony version: 1.08.01
+#
+#
+# from $PROJECT_FIRMWARE_DIRECTORY/$PROJECT_NAME.hconfig
+#
+CONFIG_APP_INSTANCES=1
+#
+# from $HARMONY_VERSION_PATH/utilities/mhc/config/app_name_idx_gencode.ftl
+#
+CONFIG_APP_MENU_IDX0=y
+CONFIG_APP_NAME_0="app"
+CONFIG_APP_AUTO_GENERATE_CODE0=n
+#
+# from $PROJECT_FIRMWARE_DIRECTORY/$PROJECT_NAME.hconfig
+#
+CONFIG_USE_EXCEPTION_HANDLER=y
+CONFIG_EXCEPTION_USE_SYS_DEBUG=y
+CONFIG_EXCEPTION_BREAKPOINT=y
+#
+# from bluetooth.hconfig
+#
+CONFIG_USE_BLUETOOTH_LIBRARIES=n
+#
+# from bootloader.hconfig
+#
+CONFIG_USE_BOOTLOADER=n
+#
+# from crypto.hconfig
+#
+CONFIG_USE_CRYPTO_LIBRARY=n
+CONFIG_USE_CRYPTO_LIB=n
+#
+# from decoder.hconfig
+#
+CONFIG_USE_IMAGE_DECODER=n
+CONFIG_USE_DECODER=n
+#
+# from drv_adc.hconfig
+#
+CONFIG_USE_DRV_ADC=n
+#
+# from drv_camera.hconfig
+#
+CONFIG_USE_DRV_CAMERA=n
+#
+# from drv_can.hconfig
+#
+CONFIG_USE_DRV_CAN=n
+#
+# from drv_cmp.hconfig
+#
+CONFIG_DRV_CVREF_ENABLE=n
+CONFIG_USE_DRV_CMP=n
+#
+# from drv_encx24j600.hconfig
+#
+CONFIG_DRV_ENCX24J600_USE_DRIVER=n
+#
+# from drv_enc28j60.hconfig
+#
+CONFIG_DRV_ENC28J60_USE_DRIVER=n
+#
+# from tcpip_mac.hconfig
+#
+CONFIG_TCPIP_USE_ETH_MAC=n
+#
+# from drv_flash.hconfig
+#
+CONFIG_USE_DRV_FLASH=n
+#
+# from drv_gfx_glcd.hconfig
+#
+CONFIG_USE_DRV_GFX_GLCD=n
+#
+# from drv_gfx_lcc.hconfig
+#
+CONFIG_USE_DRV_GFX_LCC=n
+#
+# from drv_gfx_otm2201a.hconfig
+#
+CONFIG_USE_DRV_GFX_OTM2201A=n
+#
+# from drv_gfx_ssd1926.hconfig
+#
+CONFIG_USE_DRV_GFX_SSD1926=n
+#
+# from drv_gfx_ssd1289.hconfig
+#
+CONFIG_USE_DRV_GFX_SSD1289=n
+#
+# from drv_gfx_s1d13517.hconfig
+#
+CONFIG_USE_DRV_GFX_S1D13517=n
+#
+# from drv_gfx_display.hconfig
+#
+CONFIG_USE_DRV_GFX_DISPLAY=n
+CONFIG_DRV_GFX_DISP_VSYNC_NEGATIVE_POLARITY=n
+CONFIG_DRV_GFX_DISP_HSYNC_NEGATIVE_POLARITY=n
+#
+# from drv_i2c.hconfig
+#
+CONFIG_USE_DRV_I2C=n
+#
+# from drv_ic.hconfig
+#
+CONFIG_USE_DRV_IC=n
+#
+# from drv_nvm.hconfig
+#
+CONFIG_USE_DRV_NVM=n
+#
+# from drv_oc.hconfig
+#
+CONFIG_USE_DRV_OC=n
+#
+# from drv_pmp.hconfig
+#
+CONFIG_USE_DRV_PMP=n
+#
+# from drv_rtcc.hconfig
+#
+CONFIG_USE_DRV_RTCC=y
+CONFIG_DRV_RTCC_DRIVER_MODE="STATIC"
+CONFIG_DRV_RTCC_INTERRUPT_MODE=n
+CONFIG_DRV_RTCC_ALARM_MASK_CONFIGURATION="RTCC_ALARM_EVERY_SECOND"
+CONFIG_DRV_RTCC_OUTPUT_ENABLE=n
+CONFIG_DRV_RTCC_TIME_SET="235959"
+CONFIG_DRV_RTCC_DATE_SET="140101"
+CONFIG_DRV_RTCC_DAY_SET=0
+CONFIG_DRV_RTCC_ALARM_TIME_SET="000005"
+CONFIG_DRV_RTCC_ALARM_DATE_SET="0101"
+CONFIG_DRV_RTCC_ALARM_DAY_SET=0
+#
+# from drv_sample.hconfig
+#
+CONFIG_USE_DRV_SAMPLE=n
+#
+# from drv_sdcard.hconfig
+#
+CONFIG_USE_DRV_SDCARD=n
+#
+# from drv_spi.hconfig
+#
+CONFIG_DRV_SPI_USE_DRIVER=y
+CONFIG_DRV_SPI_DRIVER_MODE="STATIC"
+CONFIG_DRV_SPI_USE_BLOCKING=n
+CONFIG_DRV_SPI_USE_ISR_MODE=n
+CONFIG_DRV_SPI_USE_POLLED_MODE=y
+CONFIG_DRV_SPI_USE_MASTER_MODE=y
+CONFIG_DRV_SPI_USE_SLAVE_MODE=n
+CONFIG_DRV_SPI_USE_STANDARD_BUFFER_MODE=y
+CONFIG_DRV_SPI_USE_ENHANCED_BUFFER_MODE=n
+CONFIG_DRV_SPI_USE_8BIT_MODE=y
+CONFIG_DRV_SPI_USE_16BIT_MODE=n
+CONFIG_DRV_SPI_USE_32BIT_MODE=n
+CONFIG_DRV_SPI_USE_DMA=n
+CONFIG_DRV_SPI_USE_CLIENT_CONFIG_FUCNTION=y
+CONFIG_DRV_SPI_INSTANCES_NUMBER=1
+CONFIG_DRV_SPI_CLIENT_NUMBER=1
+CONFIG_DRV_SPI_NUM_ELEMENTS_PER_INSTANCE=10
+#
+# from $HARMONY_VERSION_PATH/framework/driver/spi/config/drv_spi_idx.ftl
+#
+CONFIG_DRV_SPI_IDX0=y
+CONFIG_DRV_SPI_SPI_ID_IDX0="SPI_ID_1"
+CONFIG_DRV_SPI_TASK_MODE_POLLED_IDX0=y
+CONFIG_DRV_SPI_SPI_MODE_MASTER_IDX0=y
+CONFIG_DRV_SPI_COMM_WIDTH_8_BIT_IDX0=y
+CONFIG_DRV_SPI_BUFFER_STANDARD_IDX0=y
+CONFIG_DRV_SPI_ALLOW_IDLE_RUN_IDX0=n
+CONFIG_DRV_SPI_SPI_PROTOCOL_TYPE_IDX0="DRV_SPI_PROTOCOL_TYPE_STANDARD"
+CONFIG_DRV_SPI_SPI_CLOCK_IDX0="CLK_BUS_PERIPHERAL_2"
+CONFIG_DRV_SPI_BAUD_RATE_IDX0=10000000
+CONFIG_DRV_SPI_CLOCK_MODE_IDX0="DRV_SPI_CLOCK_MODE_IDLE_LOW_EDGE_RISE"
+CONFIG_DRV_SPI_INPUT_PHASE_IDX0="SPI_INPUT_SAMPLING_PHASE_IN_MIDDLE"
+CONFIG_DRV_SPI_QUEUE_SIZE_IDX0=10
+CONFIG_DRV_SPI_RESERVED_JOB_IDX0=1
+CONFIG_DRV_SPI_TRANSACTIONS_PER_SM_RUN_IDX0=16
+CONFIG_DRV_SPI_SPI_ID_STATIC_IDX0="SPI_ID_1"
+CONFIG_DRV_SPI_SPI_MODE_STATIC_IDX0="DRV_SPI_MODE_MASTER"
+CONFIG_DRV_SPI_COMM_WIDTH_STATIC_IDX0="SPI_COMMUNICATION_WIDTH_8BITS"
+CONFIG_DRV_SPI_BUFFER_STATIC_IDX0="DRV_SPI_BUFFER_TYPE_ENHANCED"
+CONFIG_DRV_SPI_ALLOW_IDLE_RUN_STATIC_IDX0=n
+CONFIG_DRV_SPI_SPI_PROTOCOL_TYPE_STATIC_IDX0="DRV_SPI_PROTOCOL_TYPE_STANDARD"
+CONFIG_DRV_SPI_FRAME_SYNC_PULSE_STATIC_IDX0="SPI_FRAME_SYNC_PULSE_ON_EVERY_DATA_CHARACTER"
+CONFIG_DRV_SPI_FRAME_PULSE_POLARITY_STATIC_IDX0="SPI_FRAME_PULSE_POLARITY_ACTIVE_LOW"
+CONFIG_DRV_SPI_FRAME_PULSE_DIRECTION_STATIC_IDX0="SPI_FRAME_PULSE_DIRECTION_OUTPUT"
+CONFIG_DRV_SPI_FRAME_PULSE_EDGE_STATIC_IDX0="SPI_FRAME_PULSE_EDGE_PRECEDES_FIRST_BIT_CLOCK"
+CONFIG_DRV_SPI_FRAME_PULSE_WIDTH_STATIC_IDX0="SPI_FRAME_PULSE_WIDTH_ONE_CLOCK_WIDE"
+CONFIG_DRV_SPI_AUDIO_TRANSMIT_MODE_STATIC_IDX0="SPI_AUDIO_TRANSMIT_STEREO"
+CONFIG_DRV_SPI_AUDIO_PROTOCOL_MODE_STATIC_IDX0="SPI_AUDIO_PROTOCOL_I2S"
+CONFIG_DRV_SPI_SPI_CLOCK_STATIC_IDX0="CLK_BUS_PERIPHERAL_2"
+CONFIG_DRV_SPI_BAUD_RATE_STATIC_IDX0=1000000
+CONFIG_DRV_SPI_CLOCK_MODE_STATIC_IDX0="DRV_SPI_CLOCK_MODE_IDLE_LOW_EDGE_RISE"
+CONFIG_DRV_SPI_INPUT_PHASE_STATIC_IDX0="SPI_INPUT_SAMPLING_PHASE_IN_MIDDLE"
+#
+# from drv_spi.hconfig
+#
+CONFIG_DRV_SPI_STATIC_INSTANCES_NUMBER=0
+#
+# from drv_sst25vf016b.hconfig
+#
+CONFIG_USE_DRV_SST25VF016B=n
+#
+# from drv_sst25vf020b.hconfig
+#
+CONFIG_USE_DRV_SST25VF020B=n
+#
+# from drv_sst25vf064c.hconfig
+#
+CONFIG_USE_DRV_SST25VF064C=n
+#
+# from drv_tmr.hconfig
+#
+CONFIG_USE_DRV_TMR=n
+#
+# from drv_adc10bit.hconfig
+#
+CONFIG_USE_DRV_TOUCH_ADC10BIT=n
+#
+# from drv_ar1021.hconfig
+#
+CONFIG_USE_DRV_TOUCH_AR1021=n
+#
+# from drv_mtch6301.hconfig
+#
+CONFIG_USE_DRV_TOUCH_MTCH6301=n
+#
+# from drv_mtch6303.hconfig
+#
+CONFIG_USE_DRV_TOUCH_MTCH6303=n
+#
+# from drv_usart.hconfig
+#
+CONFIG_USE_DRV_USART=y
+CONFIG_DRV_USART_DRIVER_MODE="STATIC"
+CONFIG_DRV_USART_INTERRUPT_MODE=y
+CONFIG_DRV_USART_BYTE_MODEL_SUPPORT=y
+CONFIG_DRV_USART_BYTE_MODEL_BLOCKING=y
+CONFIG_DRV_USART_BYTE_MODEL_CALLBACK=n
+CONFIG_DRV_USART_INSTANCES_NUMBER=1
+CONFIG_DRV_USART_CLIENTS_NUMBER=1
+#
+# from $HARMONY_VERSION_PATH/framework/driver/usart/config/drv_usart_idx.ftl
+#
+CONFIG_DRV_USART_INST_IDX0=y
+CONFIG_DRV_USART_PERIPHERAL_ID_IDX0="USART_ID_2"
+CONFIG_DRV_USART_BAUD_RATE_IDX0=115200
+CONFIG_DRV_USART_INT_PRIORITY_IDX0="INT_PRIORITY_LEVEL3"
+CONFIG_DRV_USART_INT_SUB_PRIORITY_IDX0="INT_SUBPRIORITY_LEVEL0"
+CONFIG_DRV_USART_OPER_MODE_IDX0="DRV_USART_OPERATION_MODE_NORMAL"
+CONFIG_DRV_USART_INIT_FLAG_WAKE_ON_START_IDX0=n
+CONFIG_DRV_USART_INIT_FLAG_AUTO_BAUD_IDX0=n
+CONFIG_DRV_USART_INIT_FLAG_STOP_IN_IDLE_IDX0=n
+CONFIG_DRV_USART_LINE_CNTRL_IDX0="DRV_USART_LINE_CONTROL_8NONE1"
+CONFIG_DRV_USART_HANDSHAKE_MODE_IDX0="DRV_USART_HANDSHAKE_NONE"
+CONFIG_DRV_USART_STATIC_RX_MODES_IDX0="USART_HANDSHAKE_MODE_FLOW_CONTROL"
+CONFIG_DRV_USART_STATIC_OP_MODES_IDX0="USART_ENABLE_TX_RX_USED"
+CONFIG_DRV_USART_STATIC_LINECONTROL_MODES_IDX0="USART_8N1"
+CONFIG_DRV_USART_STATIC_TX_ENABLE_IDX0=y
+CONFIG_DRV_USART_STATIC_RX_ENABLE_IDX0=y
+CONFIG_DRV_USART_STATIC_TX_INTR_MODES_IDX0="USART_TRANSMIT_FIFO_NOT_FULL"
+CONFIG_DRV_USART_STATIC_RX_INTR_MODES_IDX0="USART_RECEIVE_FIFO_ONE_CHAR"
+#
+# from drv_wifi.hconfig
+#
+CONFIG_USE_DRV_WIFI=n
+#
+# from gfx.hconfig
+#
+CONFIG_USE_GFX_STACK=n
+#
+# from gfx_segger.hconfig
+#
+CONFIG_USE_SEGGER_EMWIN=n
+#
+# from dsp.hconfig
+#
+CONFIG_USE_DSP=n
+#
+# from net_pres.hconfig
+#
+CONFIG_NET_PRES_USE=n
+#
+# from osal.hconfig
+#
+CONFIG_USE_OSAL=y
+#
+# from peripheral.hconfig
+#
+CONFIG_PERIPHERAL_LIB=y
+#
+# from sample_module.hconfig
+#
+CONFIG_USE_SAMPLE_MODULE=n
+#
+# from sys_clk.hconfig
+#
+CONFIG_USE_SYS_CLK=y
+CONFIG_SYS_CLK_MODE="STATIC"
+CONFIG_SYS_CLK_PBDIV0_OVERRIDE=n
+CONFIG_SYS_CLK_PBDIV0_MX="DIV_1"
+CONFIG_SYS_CLK_CONFIG_PRIMARY_XTAL="8000000"
+CONFIG_SYS_CLK_CONFIG_SECONDARY_XTAL=""
+CONFIG_SYS_CLK_FREQ="80000000"
+CONFIG_SYS_CLK_PBCLK_FREQ="80000000"
+CONFIG_SYS_CLK_UPLL_BEFORE_DIV2_FREQ="48000000"
+#
+# from sys_command.hconfig
+#
+CONFIG_USE_SYS_COMMAND=n
+#
+# from sys_common.hconfig
+#
+CONFIG_USE_SYS_COMMON=y
+CONFIG_SYS_BUFFER=n
+CONFIG_SYS_QUEUE=n
+#
+# from sys_console.hconfig
+#
+CONFIG_USE_SYS_CONSOLE=y
+CONFIG_SYS_CONSOLE_MODE="STATIC"
+CONFIG_SYS_CONSOLE_OVERRIDE_STDIO=y
+CONFIG_SYS_CONSOLE_SOURCE_IDX0="UART_CONSOLE"
+#
+# from sys_debug.hconfig
+#
+CONFIG_USE_SYS_DEBUG=y
+CONFIG_SYS_ERR_LEVEL="SYS_ERROR_FATAL"
+CONFIG_DEBUG_PRINT_BUFFER_SIZE=8192
+#
+# from sys_devcon.hconfig
+#
+CONFIG_USE_SYS_DEVCON=y
+CONFIG_SYS_DEVCON_USE_JTAG=n
+CONFIG_SYS_DEVCON_USE_TRACE=n
+#
+# from sys_dma.hconfig
+#
+CONFIG_USE_SYS_DMA=n
+#
+# from sys_fs.hconfig
+#
+CONFIG_USE_SYS_FS=n
+#
+# from sys_int.hconfig
+#
+CONFIG_USE_SYS_INT=y
+CONFIG_USE_EXT_INT=n
+#
+# from sys_msg.hconfig
+#
+CONFIG_USE_SYS_MSG=n
+#
+# from sys_ports.hconfig
+#
+CONFIG_USE_SYS_PORTS=y
+CONFIG_SYS_PORTS_IMPLEMENTATION="STATIC"
+CONFIG_COMPONENT_PACKAGE="TQFP"
+CONFIG_SYS_PORTS_CN=y
+CONFIG_USE_SYS_PORTS_CN_INTERRUPT=y
+CONFIG_SYS_PORTS_CN_INTERRUPT_PRIORITY="INT_PRIORITY_LEVEL2"
+CONFIG_SYS_PORTS_CN_INTERRUPT_SUB_PRIORITY="INT_SUBPRIORITY_LEVEL0"
+CONFIG_SYS_PORT_ADPCFG=0xffff
+CONFIG_SYS_PORT_CNEN=0x200000
+CONFIG_SYS_PORT_CNPU=0x0
+#
+# from $HARMONY_VERSION_PATH/framework/system/ports/config/sys_ports_idx.ftl
+#
+CONFIG_SYS_PORT_A_TRIS=0xc6ff
+CONFIG_SYS_PORT_A_LAT=0x0
+CONFIG_SYS_PORT_A_ODC=0x0
+CONFIG_SYS_PORT_B_TRIS=0xffff
+CONFIG_SYS_PORT_B_LAT=0x0
+CONFIG_SYS_PORT_B_ODC=0x0
+CONFIG_SYS_PORT_C_TRIS=0xf01e
+CONFIG_SYS_PORT_C_LAT=0x0
+CONFIG_SYS_PORT_C_ODC=0x0
+CONFIG_USE_PORT_D=y
+CONFIG_SYS_PORT_D_TRIS=0xbfef
+CONFIG_SYS_PORT_D_LAT=0x0
+CONFIG_SYS_PORT_D_ODC=0x0
+CONFIG_SYS_PORT_E_TRIS=0x3ff
+CONFIG_SYS_PORT_E_LAT=0x0
+CONFIG_SYS_PORT_E_ODC=0x0
+CONFIG_SYS_PORT_F_TRIS=0x313f
+CONFIG_SYS_PORT_F_LAT=0x0
+CONFIG_SYS_PORT_F_ODC=0x0
+CONFIG_SYS_PORT_G_TRIS=0xf3cf
+CONFIG_SYS_PORT_G_LAT=0x0
+CONFIG_SYS_PORT_G_ODC=0x0
+#
+# from sys_random.hconfig
+#
+CONFIG_USE_SYS_RANDOM=n
+#
+# from sys_reset.hconfig
+#
+CONFIG_USE_SYS_RESET=n
+#
+# from sys_rtcc.hconfig
+#
+CONFIG_USE_SYS_RTCC=n
+#
+# from sys_touch.hconfig
+#
+CONFIG_USE_SYS_TOUCH=n
+#
+# from sys_tmr.hconfig
+#
+CONFIG_USE_SYS_TMR=n
+#
+# from sys_wdt.hconfig
+#
+CONFIG_USE_SYS_WDT=n
+#
+# from test.hconfig
+#
+CONFIG_USE_TEST_HARNESS=n
+#
+# from tcpip_stack.hconfig
+#
+CONFIG_USE_TCPIP_STACK=n
+#
+# from usb.hconfig
+#
+CONFIG_USE_USB_STACK=n
+#
+# from bsp.hconfig
+#
+CONFIG_USE_BSP=n
+#
+# from rtos.hconfig
+#
+CONFIG_USE_3RDPARTY_RTOS=n
+#
+# from wolfssl.hconfig
+#
+CONFIG_USE_3RDPARTY_WOLFSSL=n
+#
+# from embtcp.hconfig
+#
+CONFIG_IN_EMB_TCPIP_USE_TCP=n
+#
+# from embdual.hconfig
+#
+CONFIG_IN_EMB_DUAL_USE_TCP=n
+#
+# from stack.hconfig
+#
+CONFIG_IN_TCPIP=n
+#
+# from gfxtp.hconfig
+#
+CONFIG_3RDPARTY_SEGGER_EMWIN_LIBRARY=n
+#
+# from harmony.hconfig
+#
+CONFIG_DEVICE_CONFIGURATION=y
+#
+# from PIC32MX795F512L.hconfig
+#
+CONFIG_USERID=0xffff
+CONFIG_FSRSSEL="PRIORITY_7"
+CONFIG_FMIIEN="ON"
+CONFIG_FETHIO="ON"
+CONFIG_FCANIO="ON"
+CONFIG_FUSBIDIO="ON"
+CONFIG_FVBUSONIO="ON"
+CONFIG_FPLLIDIV="DIV_2"
+CONFIG_FPLLMUL="MUL_20"
+CONFIG_UPLLIDIV="DIV_2"
+CONFIG_UPLLEN="OFF"
+CONFIG_FPLLODIV="DIV_1"
+CONFIG_FNOSC="FRCPLL"
+CONFIG_FSOSCEN="ON"
+CONFIG_IESO="ON"
+CONFIG_POSCMOD="OFF"
+CONFIG_OSCIOFNC="OFF"
+CONFIG_FPBDIV="DIV_1"
+CONFIG_FCKSM="CSECMD"
+CONFIG_WDTPS="PS1048576"
+CONFIG_FWDTEN="OFF"
+CONFIG_DEBUG="ON"
+CONFIG_ICESEL="ICS_PGx2"
+CONFIG_PWP="OFF"
+CONFIG_BWP="OFF"
+CONFIG_CP="OFF"
+#
+# from harmony.hconfig
+#
+CONFIG_PROJECT_STANDALONE=n
+#
+# from project.hconfig
+#
+CONFIG_XC32_HEAP="2048"
+#
+# from isa.hconfig
+#
+CONFIG_ISA_MIPS32_MODE=y
+CONFIG_ISA_MIPS16_MODE=n
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_config.h b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_config.h
new file mode 100644
index 00000000..0fa8850e
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_config.h
@@ -0,0 +1,175 @@
+/* clang-format off */
+/*******************************************************************************
+ MPLAB Harmony System Configuration Header
+
+ File Name:
+ system_config.h
+
+ Summary:
+ Build-time configuration header for the system defined by this MPLAB Harmony
+ project.
+
+ Description:
+ An MPLAB Project may have multiple configurations. This file defines the
+ build-time options for a single configuration.
+
+ Remarks:
+ This configuration header must not define any prototypes or data
+ definitions (or include any files that do). It only provides macro
+ definitions for build-time configuration options that are not instantiated
+ until used by another MPLAB Harmony module or application.
+
+ Created with MPLAB Harmony Version 1.08.01
+*******************************************************************************/
+
+// DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2013-2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+*******************************************************************************/
+// DOM-IGNORE-END
+
+#ifndef _SYSTEM_CONFIG_H
+#define _SYSTEM_CONFIG_H
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+/* This section Includes other configuration headers necessary to completely
+ define this configuration.
+*/
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus // Provide C++ Compatibility
+
+extern "C" {
+
+#endif
+// DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: System Service Configuration
+// *****************************************************************************
+// *****************************************************************************
+// *****************************************************************************
+/* Common System Service Configuration Options
+*/
+#define SYS_VERSION_STR "1.08.01"
+#define SYS_VERSION 10801
+
+// *****************************************************************************
+/* Clock System Service Configuration Options
+*/
+#define SYS_CLK_FREQ 80000000ul
+#define SYS_CLK_BUS_PERIPHERAL_1 80000000ul
+#define SYS_CLK_UPLL_BEFORE_DIV2_FREQ 48000000ul
+#define SYS_CLK_CONFIG_PRIMARY_XTAL 8000000ul
+#define SYS_CLK_CONFIG_SECONDARY_XTAL 0ul
+
+/*** Interrupt System Service Configuration ***/
+#define SYS_INT true
+
+/*** Ports System Service Configuration ***/
+#define SYS_PORT_AD1PCFG ~0xffff
+#define SYS_PORT_CNPUE 0x0
+#define SYS_PORT_CNEN 0x200000
+
+#define SYS_PORT_D_TRIS 0xbfef
+#define SYS_PORT_D_LAT 0x0
+#define SYS_PORT_D_ODC 0x0
+#define SYS_CONSOLE_DEVICE_MAX_INSTANCES 1
+#define SYS_CONSOLE_INSTANCES_NUMBER 1
+
+
+/*** Debug System Service Configuration ***/
+#define SYS_DEBUG_ENABLE
+#define DEBUG_PRINT_BUFFER_SIZE 8192
+#define SYS_DEBUG_BUFFER_DMA_READY
+#define SYS_DEBUG_USE_CONSOLE
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Driver Configuration
+// *****************************************************************************
+// *****************************************************************************
+// *****************************************************************************
+/* USART Driver Configuration Options
+*/
+#define DRV_USART_INSTANCES_NUMBER 1
+#define DRV_USART_CLIENTS_NUMBER 1
+#define DRV_USART_INTERRUPT_MODE true
+#define DRV_USART_BYTE_MODEL_SUPPORT true
+#define DRV_USART_READ_WRITE_MODEL_SUPPORT false
+#define DRV_USART_BUFFER_QUEUE_SUPPORT false
+#define DRV_USART_SUPPORT_TRANSMIT_DMA false
+#define DRV_USART_SUPPORT_RECEIVE_DMA false
+
+/*** SPI Driver Configuration ***/
+#define DRV_SPI_NUMBER_OF_MODULES 4
+/*** Driver Compilation and static configuration options. ***/
+/*** Select SPI compilation units.***/
+#define DRV_SPI_POLLED 1
+#define DRV_SPI_ISR 0
+#define DRV_SPI_MASTER 1
+#define DRV_SPI_SLAVE 0
+#define DRV_SPI_RM 1
+#define DRV_SPI_EBM 0
+#define DRV_SPI_8BIT 1
+#define DRV_SPI_16BIT 0
+#define DRV_SPI_32BIT 0
+#define DRV_SPI_DMA 0
+
+/*** SPI Driver Static Allocation Options ***/
+#define DRV_SPI_INSTANCES_NUMBER 1
+#define DRV_SPI_CLIENTS_NUMBER 1
+#define DRV_SPI_ELEMENTS_PER_QUEUE 10
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Middleware & Other Library Configuration
+// *****************************************************************************
+// *****************************************************************************
+
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Application Configuration
+// *****************************************************************************
+// *****************************************************************************
+
+/*** Application Instance 0 Configuration ***/
+
+//DOM-IGNORE-BEGIN
+#ifdef __cplusplus
+}
+#endif
+//DOM-IGNORE-END
+
+
+#endif // _SYSTEM_CONFIG_H
+/*******************************************************************************
+ End of File
+*/
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_definitions.h b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_definitions.h
new file mode 100644
index 00000000..b6df49ed
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_definitions.h
@@ -0,0 +1,134 @@
+/* clang-format off */
+/*******************************************************************************
+ System Definitions
+
+ File Name:
+ system_definitions.h
+
+ Summary:
+ MPLAB Harmony project system definitions.
+
+ Description:
+ This file contains the system-wide prototypes and definitions for an MPLAB
+ Harmony project.
+ *******************************************************************************/
+
+//DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2013-2014 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+ *******************************************************************************/
+//DOM-IGNORE-END
+
+#ifndef _SYS_DEFINITIONS_H
+#define _SYS_DEFINITIONS_H
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+
+#include
+#include
+#include
+#include "system/common/sys_common.h"
+#include "system/common/sys_module.h"
+#include "system/clk/sys_clk.h"
+#include "system/clk/sys_clk_static.h"
+#include "system/devcon/sys_devcon.h"
+#include "system/int/sys_int.h"
+#include "system/console/sys_console.h"
+#include "driver/usart/drv_usart_static.h"
+#include "system/ports/sys_ports.h"
+#include "driver/spi/static/drv_spi_static.h"
+#include "system/debug/sys_debug.h"
+
+
+
+#include "driver/rtcc/drv_rtcc_static.h"
+#include "peripheral/devcon/plib_devcon.h"
+#include "app.h"
+
+
+// DOM-IGNORE-BEGIN
+#ifdef __cplusplus // Provide C++ Compatibility
+
+extern "C" {
+
+#endif
+// DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Type Definitions
+// *****************************************************************************
+// *****************************************************************************
+
+// *****************************************************************************
+/* System Objects
+
+ Summary:
+ Structure holding the system's object handles
+
+ Description:
+ This structure contains the object handles for all objects in the
+ MPLAB Harmony project's system configuration.
+
+ Remarks:
+ These handles are returned from the "Initialize" functions for each module
+ and must be passed into the "Tasks" function for each module.
+*/
+
+typedef struct
+{
+ SYS_MODULE_OBJ sysDevcon;
+ SYS_MODULE_OBJ drvUsart0;
+ SYS_MODULE_OBJ sysDebug;
+ SYS_MODULE_OBJ sysConsole0;
+
+ /*** SPI Object for Index 0 ***/
+ SYS_MODULE_OBJ spiObjectIdx0;
+
+} SYSTEM_OBJECTS;
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: extern declarations
+// *****************************************************************************
+// *****************************************************************************
+
+extern SYSTEM_OBJECTS sysObj;
+
+
+//DOM-IGNORE-BEGIN
+#ifdef __cplusplus
+}
+#endif
+//DOM-IGNORE-END
+
+#endif /* _SYS_DEFINITIONS_H */
+/*******************************************************************************
+ End of File
+*/
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_exceptions.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_exceptions.c
new file mode 100644
index 00000000..cc389b7c
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_exceptions.c
@@ -0,0 +1,144 @@
+/* clang-format off */
+/*******************************************************************************
+ MPLAB Harmony Exceptions Source File
+
+ File Name:
+ system_exceptions.c
+
+ Summary:
+ This file contains a function which overrides the deafult _weak_ exception
+ handler provided by the XC32 compiler.
+
+ Description:
+ This file redefines the default _weak_ exception handler with a more debug
+ friendly one. If an unexpected exception occurs the code will stop in a
+ while(1) loop. The debugger can be halted and two variables _excep_code and
+ _except_addr can be examined to determine the cause and address where the
+ exception occured.
+ *******************************************************************************/
+
+// DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2013-2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+ *******************************************************************************/
+// DOM-IGNORE-END
+
+
+#include /* Defines special funciton registers, CP0 regs */
+#include "system_config.h"
+#include "system_definitions.h"
+#include "system/debug/sys_debug.h"
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Global Data Definitions
+// *****************************************************************************
+// *****************************************************************************
+
+/*******************************************************************************
+ Exception Reason Data
+
+
+
+ Remarks:
+ These global static items are used instead of local variables in the
+ _general_exception_handler function because the stack may not be available
+ if an exception has occured.
+*/
+
+/* Code identifying the cause of the exception (CP0 Cause register). */
+static unsigned int _excep_code;
+
+/* Address of instruction that caused the exception. */
+static unsigned int _excep_addr;
+
+/* Pointer to the string describing the cause of the exception. */
+static char *_cause_str;
+
+/* Array identifying the cause (indexed by _exception_code). */
+static char *cause[] =
+{
+ "Interrupt",
+ "Undefined",
+ "Undefined",
+ "Undefined",
+ "Load/fetch address error",
+ "Store address error",
+ "Instruction bus error",
+ "Data bus error",
+ "Syscall",
+ "Breakpoint",
+ "Reserved instruction",
+ "Coprocessor unusable",
+ "Arithmetic overflow",
+ "Trap",
+ "Reserved",
+ "Reserved",
+ "Reserved",
+ "Reserved",
+ "Reserved"
+};
+
+//
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Exception Handling
+// *****************************************************************************
+// *****************************************************************************
+
+/*******************************************************************************
+ Function:
+ void _general_exception_handler ( void )
+
+ Summary:
+ Overrides the XC32 _weak_ _generic_exception_handler.
+
+ Description:
+ This function overrides the XC32 default _weak_ _generic_exception_handler.
+
+ Remarks:
+ Refer to the XC32 User's Guide for additional information.
+ */
+
+void _general_exception_handler ( void )
+{
+ /* Mask off Mask of the ExcCode Field from the Cause Register
+ Refer to the MIPs Software User's manual */
+ _excep_code = (_CP0_GET_CAUSE() & 0x0000007C) >> 2;
+ _excep_addr = _CP0_GET_EPC();
+ _cause_str = cause[_excep_code];
+
+ SYS_DEBUG_PRINT(SYS_ERROR_ERROR, "\nGeneral Exception %s (cause=%d, addr=%x).\n",
+ _cause_str, _excep_code, _excep_addr);
+
+ while (1)
+ {
+ SYS_DEBUG_BreakPoint();
+ }
+}
+
+/*******************************************************************************
+ End of File
+*/
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_init.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_init.c
new file mode 100644
index 00000000..386facee
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_init.c
@@ -0,0 +1,220 @@
+/* clang-format off */
+/*******************************************************************************
+ System Initialization File
+
+ File Name:
+ system_init.c
+
+ Summary:
+ This file contains source code necessary to initialize the system.
+
+ Description:
+ This file contains source code necessary to initialize the system. It
+ implements the "SYS_Initialize" function, defines the configuration bits,
+ and allocates any necessary global system resources, such as the
+ sysObj structure that contains the object handles to all the MPLAB Harmony
+ module objects in the system.
+ *******************************************************************************/
+
+// DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2013-2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+ *******************************************************************************/
+// DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+
+#include "system_config.h"
+#include "system_definitions.h"
+
+
+// ****************************************************************************
+// ****************************************************************************
+// Section: Configuration Bits
+// ****************************************************************************
+// ****************************************************************************
+//
+
+/*** DEVCFG0 ***/
+
+#pragma config DEBUG = ON
+#pragma config ICESEL = ICS_PGx2
+#pragma config PWP = OFF
+#pragma config BWP = OFF
+#pragma config CP = OFF
+
+/*** DEVCFG1 ***/
+
+#pragma config FNOSC = FRCPLL
+#pragma config FSOSCEN = ON
+#pragma config IESO = ON
+#pragma config POSCMOD = OFF
+#pragma config OSCIOFNC = OFF
+#pragma config FPBDIV = DIV_1
+#pragma config FCKSM = CSECMD
+#pragma config WDTPS = PS1048576
+#pragma config FWDTEN = OFF
+/*** DEVCFG2 ***/
+
+#pragma config FPLLIDIV = DIV_2
+#pragma config FPLLMUL = MUL_20
+#pragma config FPLLODIV = DIV_1
+#pragma config UPLLIDIV = DIV_2
+#pragma config UPLLEN = OFF
+/*** DEVCFG3 ***/
+
+#pragma config USERID = 0xffff
+#pragma config FSRSSEL = PRIORITY_7
+#pragma config FMIIEN = ON
+#pragma config FETHIO = ON
+#pragma config FCANIO = ON
+#pragma config FUSBIDIO = ON
+#pragma config FVBUSONIO = ON
+//
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Driver Initialization Data
+// *****************************************************************************
+// *****************************************************************************
+//
+ /*** SPI Driver Initialization Data ***/
+//
+//
+//
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: System Data
+// *****************************************************************************
+// *****************************************************************************
+
+/* Structure to hold the object handles for the modules in the system. */
+SYSTEM_OBJECTS sysObj;
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Module Initialization Data
+// *****************************************************************************
+// *****************************************************************************
+//
+//
+//
+/*** System Debug Initialization Data ***/
+
+SYS_DEBUG_INIT debugInit =
+{
+ .moduleInit = {0},
+ .errorLevel = SYS_ERROR_FATAL
+};
+//
+//
+/*******************************************************************************
+ Device Control System Service Initialization Data
+*/
+
+const SYS_DEVCON_INIT sysDevconInit =
+{
+ .moduleInit = {0},
+};
+
+//
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Library/Stack Initialization Data
+// *****************************************************************************
+// *****************************************************************************
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Static Initialization Functions
+// *****************************************************************************
+// *****************************************************************************
+
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: System Initialization
+// *****************************************************************************
+// *****************************************************************************
+
+/*******************************************************************************
+ Function:
+ void SYS_Initialize ( void *data )
+
+ Summary:
+ Initializes the board, services, drivers, application and other modules.
+
+ Remarks:
+ See prototype in system/common/sys_module.h.
+ */
+
+void SYS_Initialize ( void* data )
+{
+ /* Core Processor Initialization */
+ SYS_CLK_Initialize( NULL );
+ sysObj.sysDevcon = SYS_DEVCON_Initialize(SYS_DEVCON_INDEX_0, (SYS_MODULE_INIT*)&sysDevconInit);
+ SYS_DEVCON_PerformanceConfig(SYS_CLK_SystemFrequencyGet());
+ SYS_DEVCON_JTAGDisable();
+ SYS_PORTS_Initialize();
+
+ /* Initialize Drivers */
+
+ /*** SPI Driver Index 0 initialization***/
+
+ sysObj.spiObjectIdx0 = DRV_SPI_Initialize(DRV_SPI_INDEX_0, (const SYS_MODULE_INIT * const)NULL);
+ /* RTCC Initialization Call */
+ DRV_RTCC_Initialize();
+
+ sysObj.drvUsart0 = DRV_USART_Initialize(DRV_USART_INDEX_0, (SYS_MODULE_INIT *)NULL);
+ SYS_INT_VectorPrioritySet(INT_VECTOR_UART2, INT_PRIORITY_LEVEL3);
+ SYS_INT_VectorSubprioritySet(INT_VECTOR_UART2, INT_SUBPRIORITY_LEVEL0);
+
+ /* Initialize System Services */
+ sysObj.sysConsole0 = SYS_CONSOLE_Initialize(SYS_CONSOLE_INDEX_0, NULL);
+
+
+ /*** Debug Service Initialization Code ***/
+ sysObj.sysDebug = SYS_DEBUG_Initialize(SYS_DEBUG_INDEX_0, (SYS_MODULE_INIT*)&debugInit);
+
+ /*** Interrupt Service Initialization Code ***/
+ SYS_INT_Initialize();
+
+ /* Initialize Middleware */
+
+ /* Enable Global Interrupts */
+ SYS_INT_Enable();
+
+ /* Initialize the Application */
+ APP_Initialize();
+}
+
+
+/*******************************************************************************
+ End of File
+*/
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_interrupt.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_interrupt.c
new file mode 100644
index 00000000..15fca295
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_interrupt.c
@@ -0,0 +1,113 @@
+/* clang-format off */
+/*******************************************************************************
+ System Interrupts File
+
+ File Name:
+ system_interrupt.c
+
+ Summary:
+ Raw ISR definitions.
+
+ Description:
+ This file contains a definitions of the raw ISRs required to support the
+ interrupt sub-system.
+
+ Summary:
+ This file contains source code for the interrupt vector functions in the
+ system.
+
+ Description:
+ This file contains source code for the interrupt vector functions in the
+ system. It implements the system and part specific vector "stub" functions
+ from which the individual "Tasks" functions are called for any modules
+ executing interrupt-driven in the MPLAB Harmony system.
+
+ Remarks:
+ This file requires access to the systemObjects global data structure that
+ contains the object handles to all MPLAB Harmony module objects executing
+ interrupt-driven in the system. These handles are passed into the individual
+ module "Tasks" functions to identify the instance of the module to maintain.
+ *******************************************************************************/
+
+// DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2011-2014 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+ *******************************************************************************/
+// DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+
+#include
+#include
+#include "app.h"
+#include "system_definitions.h"
+#include "simplelink.h"
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: System Interrupt Vector Functions
+// *****************************************************************************
+// *****************************************************************************
+extern P_EVENT_HANDLER g_cc3100_IRQ_handler;
+
+void __ISR(_CHANGE_NOTICE_VECTOR, ipl2AUTO) _IntHandlerChangeNotification(void)
+{
+ if (SYS_PORTS_PinRead(PORTS_ID_0, PORT_CHANNEL_D, PORTS_BIT_POS_15) == 0x01) {
+ if (g_cc3100_IRQ_handler != NULL) {
+ g_cc3100_IRQ_handler(0);
+ }
+ }
+ DRV_SPI_Tasks(sysObj.spiObjectIdx0);
+
+ PLIB_INT_SourceFlagClear(INT_ID_0,INT_SOURCE_CHANGE_NOTICE);
+}
+
+void __ISR(_UART_2_VECTOR, ipl3AUTO) _IntHandlerDrvUsartInstance0(void)
+{
+ DRV_USART_TasksTransmit(sysObj.drvUsart0);
+ DRV_USART_TasksReceive(sysObj.drvUsart0);
+ DRV_USART_TasksError(sysObj.drvUsart0);
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*******************************************************************************
+ End of File
+*/
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_tasks.c b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_tasks.c
new file mode 100644
index 00000000..415854c3
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/system_tasks.c
@@ -0,0 +1,91 @@
+/* clang-format off */
+/*******************************************************************************
+ System Tasks File
+
+ File Name:
+ system_tasks.c
+
+ Summary:
+ This file contains source code necessary to maintain system's polled state
+ machines.
+
+ Description:
+ This file contains source code necessary to maintain system's polled state
+ machines. It implements the "SYS_Tasks" function that calls the individual
+ "Tasks" functions for all polled MPLAB Harmony modules in the system.
+
+ Remarks:
+ This file requires access to the systemObjects global data structure that
+ contains the object handles to all MPLAB Harmony module objects executing
+ polled in the system. These handles are passed into the individual module
+ "Tasks" functions to identify the instance of the module to maintain.
+ *******************************************************************************/
+
+// DOM-IGNORE-BEGIN
+/*******************************************************************************
+Copyright (c) 2013-2015 released Microchip Technology Inc. All rights reserved.
+
+Microchip licenses to you the right to use, modify, copy and distribute
+Software only when embedded on a Microchip microcontroller or digital signal
+controller that is integrated into your product or third party product
+(pursuant to the sublicense terms in the accompanying license agreement).
+
+You should refer to the license agreement accompanying this Software for
+additional information regarding your rights and obligations.
+
+SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
+EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
+MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
+IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
+CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
+OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
+INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
+CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
+SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
+(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
+ *******************************************************************************/
+// DOM-IGNORE-END
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: Included Files
+// *****************************************************************************
+// *****************************************************************************
+
+#include "system_config.h"
+#include "system_definitions.h"
+
+// *****************************************************************************
+// *****************************************************************************
+// Section: System "Tasks" Routine
+// *****************************************************************************
+// *****************************************************************************
+
+/*******************************************************************************
+ Function:
+ void SYS_Tasks ( void )
+
+ Remarks:
+ See prototype in system/common/sys_module.h.
+*/
+
+void SYS_Tasks ( void )
+{
+ /* Maintain system services */
+ SYS_CONSOLE_Tasks(sysObj.sysConsole0);
+ SYS_DEVCON_Tasks(sysObj.sysDevcon);
+
+ /* Maintain Device Drivers */
+ DRV_SPI_Tasks(sysObj.spiObjectIdx0);
+
+ /* Maintain Middleware & Other Libraries */
+
+ /* Maintain the application's state machine. */
+ APP_Tasks();
+}
+
+
+/*******************************************************************************
+ End of File
+ */
+
diff --git a/examples/PIC32/mqtt_client/firmware/src/user.h b/examples/PIC32/mqtt_client/firmware/src/user.h
new file mode 100644
index 00000000..f4550274
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/user.h
@@ -0,0 +1,1109 @@
+/*
+ * user.h - CC31xx/CC32xx Host Driver Implementation
+ *
+ * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * Adapted for PIC32 by 2016 Cesanta Software Limited
+ */
+
+#ifndef __USER_H__
+#define __USER_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*!
+ ******************************************************************************
+
+ \defgroup porting_user_include Porting - User Include Files
+
+ This section IS NOT REQUIRED in case user provided primitives are handled
+ in makefiles or project configurations (IDE)
+
+ PORTING ACTION:
+ - Include all required header files for the definition of:
+ -# Transport layer library API (e.g. SPI, UART)
+ -# OS primitives definitions (e.g. Task spawn, Semaphores)
+ -# Memory management primitives (e.g. alloc, free)
+
+ ******************************************************************************
+ */
+#undef FD_SETSIZE
+#undef FD_SET
+#undef FD_CLR
+#undef FD_ISSET
+#undef FD_ZERO
+#undef htonl
+#undef ntohl
+#undef htons
+#undef ntohs
+#undef EBADF
+#undef ENOMEM
+#undef EINVAL
+#include
+
+typedef int Fd_t;
+
+typedef void (*P_EVENT_HANDLER)(void *pValue);
+
+typedef P_EVENT_HANDLER SL_P_EVENT_HANDLER;
+
+/*!
+ \def MAX_CONCURRENT_ACTIONS
+
+ \brief Defines the maximum number of concurrent action in the system
+ Min:1 , Max: 32
+
+ Actions which has async events as return, can be
+
+ \sa
+
+ \note In case there are not enough resources for the actions needed
+ in the system, error is received: POOL_IS_EMPTY one option is
+ to increase MAX_CONCURRENT_ACTIONS (improves performance but
+ results in memory consumption) Other option is to call the API
+ later (decrease performance)
+
+ \warning In case of setting to one, recommend to use non-blocking
+ recv\recvfrom to allow multiple socket recv
+*/
+#define MAX_CONCURRENT_ACTIONS 10
+
+/*!
+ ******************************************************************************
+
+ \defgroup proting_capabilities Porting - Capabilities Set
+
+ This section IS NOT REQUIRED in case one of the following pre defined
+ capabilities set is in use:
+ - SL_TINY
+ - SL_SMALL
+ - SL_FULL
+
+ PORTING ACTION:
+ - Define one of the pre-defined capabilities set or uncomment the
+ relevant definitions below to select the required capabilities
+
+ @{
+
+ *******************************************************************************
+*/
+
+/*!
+ \def SL_INC_ARG_CHECK
+
+ \brief Defines whether the SimpleLink driver perform argument check
+ or not
+
+ When defined, the SimpleLink driver perform argument check on
+ function call. Removing this define could reduce some code
+ size and improve slightly the performances but may impact in
+ unpredictable behavior in case of invalid arguments
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning Removing argument check may cause unpredictable behavior in
+ case of invalid arguments.
+ In this case the user is responsible to argument validity
+ (for example all handlers must not be NULL)
+*/
+#define SL_INC_ARG_CHECK
+
+/*!
+ \def SL_INC_STD_BSD_API_NAMING
+
+ \brief Defines whether SimpleLink driver should expose standard BSD
+ APIs or not
+
+ When defined, the SimpleLink driver in addtion to its
+ alternative
+ BSD APIs expose also standard BSD APIs.
+ Stadrad BSD API includs the following functions:
+ socket , close , accept , bind , listen , connect , select ,
+ setsockopt , getsockopt , recv , recvfrom , write , send ,
+ sendto ,
+ gethostbyname
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+
+#define SL_INC_STD_BSD_API_NAMING
+
+/*!
+ \brief Defines whether to include extended API in SimpleLink driver
+ or not
+
+ When defined, the SimpleLink driver will include also all
+ exteded API of the included packages
+
+ \sa ext_api
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define SL_INC_EXT_API
+
+/*!
+ \brief Defines whether to include WLAN package in SimpleLink driver
+ or not
+
+ When defined, the SimpleLink driver will include also
+ the WLAN package
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define SL_INC_WLAN_PKG
+
+/*!
+ \brief Defines whether to include SOCKET package in SimpleLink
+ driver or not
+
+ When defined, the SimpleLink driver will include also
+ the SOCKET package
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define SL_INC_SOCKET_PKG
+
+/*!
+ \brief Defines whether to include NET_APP package in SimpleLink
+ driver or not
+
+ When defined, the SimpleLink driver will include also the
+ NET_APP package
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define SL_INC_NET_APP_PKG
+
+/*!
+ \brief Defines whether to include NET_CFG package in SimpleLink
+ driver or not
+
+ When defined, the SimpleLink driver will include also
+ the NET_CFG package
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define SL_INC_NET_CFG_PKG
+
+/*!
+ \brief Defines whether to include NVMEM package in SimpleLink
+ driver or not
+
+ When defined, the SimpleLink driver will include also the
+ NVMEM package
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define SL_INC_NVMEM_PKG
+
+/*!
+ \brief Defines whether to include socket server side APIs
+ in SimpleLink driver or not
+
+ When defined, the SimpleLink driver will include also socket
+ server side APIs
+
+ \sa server_side
+
+ \note
+
+ \warning
+*/
+#define SL_INC_SOCK_SERVER_SIDE_API
+
+/*!
+ \brief Defines whether to include socket client side APIs in SimpleLink
+ driver or not
+
+ When defined, the SimpleLink driver will include also socket
+ client side APIs
+
+ \sa client_side
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define SL_INC_SOCK_CLIENT_SIDE_API
+
+/*!
+ \brief Defines whether to include socket receive APIs in SimpleLink
+ driver or not
+
+ When defined, the SimpleLink driver will include also socket
+ receive side APIs
+
+ \sa recv_api
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define SL_INC_SOCK_RECV_API
+
+/*!
+ \brief Defines whether to include socket send APIs in SimpleLink
+ driver or not
+
+ When defined, the SimpleLink driver will include also socket
+ send side APIs
+
+ \sa send_api
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define SL_INC_SOCK_SEND_API
+
+/*!
+
+ Close the Doxygen group.
+ @}
+
+ */
+
+/*!
+ ******************************************************************************
+
+ \defgroup porting_enable_device Porting - Device Enable/Disable
+
+ The enable/disable line (nHib) provide mechanism to enter the device into
+ the least current consumption mode. This mode could be used when no traffic
+ is required (tx/rx).
+ when this hardware line is not connected to any IO of the host this define
+ should be left empty.
+
+
+ \note Not connecting this line results in ability to start the driver
+ only once.
+
+ PORTING ACTION:
+ - Bind the GPIO that is connected to the device to the SimpleLink
+ driver
+
+ @{
+
+ ******************************************************************************
+*/
+/*!
+ \brief Preamble to the enabling the Network Processor.
+ Placeholder to implement any pre-process operations
+ before enabling networking operations.
+
+ \sa sl_DeviceEnable
+
+ \note belongs to \ref ported_sec
+
+*/
+#define sl_DeviceEnablePreamble()
+
+/*!
+ \brief Enable the device by set the appropriate GPIO to high
+
+ \sa sl_DeviceDisable
+
+ \note belongs to \ref proting_sec
+
+ \warning if nHib/nShutdown pins are not connected to the host this define
+ should be left empty. Not connecting on of these lines may
+ result
+ in higher power consumption and inability to start and stop the
+ driver correctly.
+*/
+#define sl_DeviceEnable CC3100_enable
+
+/*!
+ \brief Disable the device by setting the appropriate GPIO to Low
+
+ \sa sl_DeviceEnable
+
+ \note belongs to \ref proting_sec
+
+ \warning if nHib/nShutdown pins are not connected to the host this define
+ should be left empty. Not connecting on of these lines may
+ result
+ in higher power consumption and inability to start and stop the
+ driver correctly.
+*/
+
+#define sl_DeviceDisable CC3100_disable
+
+/*!
+
+ Close the Doxygen group.
+ @}
+
+ */
+
+/*!
+ ******************************************************************************
+
+ \defgroup porting_interface Porting - Communication Interface
+
+ The simple link device can work with different communication
+ channels (e.g. spi/uart). Texas Instruments provides single driver
+ that can work with all these types. This section bind between the
+ physical communication interface channel and the SimpleLink driver
+
+
+ \note Correct and efficient implementation of this driver is critical
+ for the performances of the SimpleLink device on this platform.
+
+
+ PORTING ACTION:
+ - Bind the functions of the communication channel interface driver with
+ the simple link driver
+
+ @{
+
+ ******************************************************************************
+*/
+
+#define _SlFd_t int
+
+/*!
+ \brief Opens an interface communication port to be used for
+ communicating
+ with a SimpleLink device
+
+ Given an interface name and option flags, this function opens
+ the communication port and creates a file descriptor.
+ This file descriptor is used afterwards to read and write
+ data from and to this specific communication channel.
+ The speed, clock polarity, clock phase, chip select and all
+ other
+ specific attributes of the channel are all should be set to
+ hardcoded
+ in this function.
+
+ \param ifName - points to the interface name/path. The interface
+ name is an
+ optional attributes that the simple link driver
+ receives
+ on opening the driver (sl_Start).
+ In systems that the spi channel is not implemented
+ as
+ part of the os device drivers, this parameter could
+ be NULL.
+
+ \param flags - optional flags parameters for future use
+
+ \return upon successful completion, the function shall open the channel
+ and return a non-negative integer representing the file
+ descriptor.
+ Otherwise, -1 shall be returned
+
+ \sa sl_IfClose , sl_IfRead , sl_IfWrite
+
+ \note The prototype of the function is as follow:
+ Fd_t xxx_IfOpen(char* pIfName , unsigned long flags);
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define sl_IfOpen spi_Open
+
+/*!
+ \brief Closes an opened interface communication port
+
+ \param fd - file descriptor of opened communication channel
+
+ \return upon successful completion, the function shall return 0.
+ Otherwise, -1 shall be returned
+
+ \sa sl_IfOpen , sl_IfRead , sl_IfWrite
+
+ \note The prototype of the function is as follow:
+ int xxx_IfClose(Fd_t Fd);
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define sl_IfClose spi_Close
+
+/*!
+ \brief Attempts to read up to len bytes from an opened communication
+ channel
+ into a buffer starting at pBuff.
+
+ \param fd - file descriptor of an opened communication channel
+
+ \param pBuff - pointer to the first location of a buffer that
+ contains enough
+ space for all expected data
+
+ \param len - number of bytes to read from the communication
+ channel
+
+ \return upon successful completion, the function shall return the number
+ of read bytes.
+ Otherwise, 0 shall be returned
+
+ \sa sl_IfClose , sl_IfOpen , sl_IfWrite
+
+
+ \note The prototype of the function is as follow:
+ int xxx_IfRead(Fd_t Fd , char* pBuff , int Len);
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define sl_IfRead spi_Read
+
+/*!
+ \brief attempts to write up to len bytes to the SPI channel
+
+ \param fd - file descriptor of an opened communication channel
+
+ \param pBuff - pointer to the first location of a buffer that
+ contains
+ the data to send over the communication channel
+
+ \param len - number of bytes to write to the communication
+ channel
+
+ \return upon successful completion, the function shall return the number
+ of sent bytes.
+ therwise, 0 shall be returned
+
+ \sa sl_IfClose , sl_IfOpen , sl_IfRead
+
+ \note This function could be implemented as zero copy and return only
+ upon successful completion
+ of writing the whole buffer, but in cases that memory allocation
+ is not too tight, the
+ function could copy the data to internal buffer, return back and
+ complete the write in
+ parallel to other activities as long as the other SPI activities
+ would be blocked until
+ the entire buffer write would be completed
+
+ The prototype of the function is as follow:
+ int xxx_IfWrite(Fd_t Fd , char* pBuff , int Len);
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define sl_IfWrite spi_Write
+
+/*!
+ \brief register an interrupt handler routine for the host IRQ
+
+ \param InterruptHdl - pointer to interrupt handler routine
+
+ \param pValue - pointer to a memory structure that is passed
+ to the interrupt handler.
+
+ \return upon successful registration, the function shall return 0.
+ Otherwise, -1 shall be returned
+
+ \sa
+
+ \note If there is already registered interrupt handler, the function
+ should overwrite the old handler with the new one
+
+ \note If the handler is a null pointer, the function should
+ un-register the
+ interrupt handler, and the interrupts can be disabled.
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define sl_IfRegIntHdlr(InterruptHdl, pValue) \
+ registerInterruptHandler(InterruptHdl, pValue)
+/*!
+ \brief Masks the Host IRQ
+
+ \sa sl_IfUnMaskIntHdlr
+
+
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+
+#define sl_IfMaskIntHdlr()
+
+/*!
+ \brief Unmasks the Host IRQ
+
+ \sa sl_IfMaskIntHdlr
+
+
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+
+#define sl_IfUnMaskIntHdlr()
+
+/*!
+ \brief Write Handers for statistics debug on write
+
+ \param interface handler - pointer to interrupt handler routine
+
+
+ \return no return value
+
+ \sa
+
+ \note An optional hooks for monitoring before and after write info
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+/*
+#define SL_START_WRITE_STAT
+*/
+
+#ifdef SL_START_WRITE_STAT
+#define sl_IfStartWriteSequence SlStudio_SpiStartWriteSeq
+#define sl_IfEndWriteSequence SlStudio_SpiEndWriteSeq
+#endif
+/*!
+
+ Close the Doxygen group.
+ @}
+
+*/
+
+/*!
+ ******************************************************************************
+
+ \defgroup porting_mem_mgm Porting - Memory Management
+
+ This section declare in which memory management model the SimpleLink driver
+ will run:
+ -# Static
+ -# Dynamic
+
+ This section IS NOT REQUIRED in case Static model is selected.
+
+ The default memory model is Static
+
+ PORTING ACTION:
+ - If dynamic model is selected, define the alloc and free functions.
+
+ @{
+
+ *****************************************************************************
+*/
+
+/*!
+ \brief Defines whether the SimpleLink driver is working in dynamic
+ memory model or not
+
+ When defined, the SimpleLink driver use dynamic allocations
+ if dynamic allocation is selected malloc and free functions
+ must be retrieved
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+
+/*
+#define SL_MEMORY_MGMT_DYNAMIC
+*/
+
+#ifdef SL_MEMORY_MGMT_DYNAMIC
+
+/*!
+ \brief
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define sl_Malloc(Size) malloc(Size)
+
+/*!
+ \brief
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define sl_Free(pMem) free(pMem)
+
+#endif
+
+/*!
+
+ Close the Doxygen group.
+ @}
+
+*/
+
+/*!
+ ******************************************************************************
+
+ \defgroup porting_os Porting - Operating System
+
+ The simple link driver can run on multi-threaded environment as well
+ as non-os environment (mail loop)
+
+ This section IS NOT REQUIRED in case you are working on non-os environment.
+
+ If you choose to work in multi-threaded environment under any operating
+ system
+ you will have to provide some basic adaptation routines to allow the driver
+ to protect access to resources from different threads (locking object) and
+ to allow synchronization between threads (sync objects).
+
+ PORTING ACTION:
+ -# Uncomment SL_PLATFORM_MULTI_THREADED define
+ -# Bind locking object routines
+ -# Bind synchronization object routines
+ -# Optional - Bind spawn thread routine
+
+ @{
+
+ ******************************************************************************
+*/
+
+/*
+#define SL_PLATFORM_MULTI_THREADED
+*/
+
+#ifdef SL_PLATFORM_MULTI_THREADED
+
+/*!
+ \brief
+ \sa
+ \note belongs to \ref proting_sec
+ \warning
+*/
+#define SL_OS_RET_CODE_OK
+
+/*!
+ \brief
+ \sa
+ \note belongs to \ref proting_sec
+ \warning
+*/
+#define SL_OS_WAIT_FOREVER
+
+/*!
+ \brief
+ \sa
+ \note belongs to \ref proting_sec
+ \warning
+*/
+#define SL_OS_NO_WAIT
+
+/*!
+ \brief type definition for a time value
+
+ \note On each porting or platform the type could be whatever is needed -
+ integer, pointer to structure etc.
+
+ \note belongs to \ref proting_sec
+*/
+#define _SlTime_t
+
+/*!
+ \brief type definition for a sync object container
+
+ Sync object is object used to synchronize between two threads or thread and
+ interrupt handler.
+ One thread is waiting on the object and the other thread send a signal,
+ which then
+ release the waiting thread.
+ The signal must be able to be sent from interrupt context.
+ This object is generally implemented by binary semaphore or events.
+
+ \note On each porting or platform the type could be whatever is needed -
+ integer, structure etc.
+
+ \note belongs to \ref proting_sec
+*/
+#define _SlSyncObj_t
+
+/*!
+ \brief This function creates a sync object
+
+ The sync object is used for synchronization between diffrent thread or ISR
+ and
+ a thread.
+
+ \param pSyncObj - pointer to the sync object control block
+
+ \return upon successful creation the function should return 0
+ Otherwise, a negative value indicating the error code shall be
+ returned
+
+ \note belongs to \ref proting_sec
+ \warning
+*/
+#define sl_SyncObjCreate(pSyncObj, pName)
+
+/*!
+ \brief This function deletes a sync object
+
+ \param pSyncObj - pointer to the sync object control block
+
+ \return upon successful deletion the function should return 0
+ Otherwise, a negative value indicating the error code shall be
+ returned
+ \note belongs to \ref proting_sec
+ \warning
+*/
+#define sl_SyncObjDelete(pSyncObj)
+
+/*!
+ \brief This function generates a sync signal for the object.
+
+ All suspended threads waiting on this sync object are resumed
+
+ \param pSyncObj - pointer to the sync object control block
+
+ \return upon successful signaling the function should return 0
+ Otherwise, a negative value indicating the error code shall be
+ returned
+ \note the function could be called from ISR context
+ \warning
+*/
+#define sl_SyncObjSignal(pSyncObj)
+
+/*!
+ \brief This function waits for a sync signal of the specific sync object
+
+ \param pSyncObj - pointer to the sync object control block
+ \param Timeout - numeric value specifies the maximum number of mSec
+ to
+ stay suspended while waiting for the sync signal
+ Currently, the simple link driver uses only two
+ values:
+ - OSI_WAIT_FOREVER
+ - OSI_NO_WAIT
+
+ \return upon successful reception of the signal within the timeout window
+ return 0
+ Otherwise, a negative value indicating the error code shall be
+ returned
+ \note belongs to \ref proting_sec
+ \warning
+*/
+#define sl_SyncObjWait(pSyncObj, Timeout)
+
+/*!
+ \brief type definition for a locking object container
+
+ Locking object are used to protect a resource from mutual accesses of two or
+ more threads.
+ The locking object should suppurt reentrant locks by a signal thread.
+ This object is generally implemented by mutex semaphore
+
+ \note On each porting or platform the type could be whatever is needed -
+ integer, structure etc.
+ \note belongs to \ref proting_sec
+*/
+#define _SlLockObj_t
+
+/*!
+ \brief This function creates a locking object.
+
+ The locking object is used for protecting a shared resources between
+ different
+ threads.
+
+ \param pLockObj - pointer to the locking object control block
+
+ \return upon successful creation the function should return 0
+ Otherwise, a negative value indicating the error code shall be
+ returned
+ \note belongs to \ref proting_sec
+ \warning
+*/
+#define sl_LockObjCreate(pLockObj, pName)
+
+/*!
+ \brief This function deletes a locking object.
+
+ \param pLockObj - pointer to the locking object control block
+
+ \return upon successful deletion the function should return 0
+ Otherwise, a negative value indicating the error code shall be
+ returned
+ \note belongs to \ref proting_sec
+ \warning
+*/
+#define sl_LockObjDelete(pLockObj)
+
+/*!
+ \brief This function locks a locking object.
+
+ All other threads that call this function before this thread calls
+ the osi_LockObjUnlock would be suspended
+
+ \param pLockObj - pointer to the locking object control block
+ \param Timeout - numeric value specifies the maximum number of mSec
+ to
+ stay suspended while waiting for the locking object
+ Currently, the simple link driver uses only two
+ values:
+ - OSI_WAIT_FOREVER
+ - OSI_NO_WAIT
+
+
+ \return upon successful reception of the locking object the function should
+ return 0
+ Otherwise, a negative value indicating the error code shall be
+ returned
+ \note belongs to \ref proting_sec
+ \warning
+*/
+#define sl_LockObjLock(pLockObj, Timeout)
+
+/*!
+ \brief This function unlock a locking object.
+
+ \param pLockObj - pointer to the locking object control block
+
+ \return upon successful unlocking the function should return 0
+ Otherwise, a negative value indicating the error code shall be
+ returned
+ \note belongs to \ref proting_sec
+ \warning
+*/
+#define sl_LockObjUnlock(pLockObj)
+
+#endif
+/*!
+ \brief This function call the pEntry callback from a different context
+
+ \param pEntry - pointer to the entry callback function
+
+ \param pValue - pointer to any type of memory structure that would
+ be
+ passed to pEntry callback from the execution thread.
+
+ \param flags - execution flags - reserved for future usage
+
+ \return upon successful registration of the spawn the function should return
+ 0
+ (the function is not blocked till the end of the execution of the
+ function
+ and could be returned before the execution is actually completed)
+ Otherwise, a negative value indicating the error code shall be
+ returned
+ \note belongs to \ref proting_sec
+ \warning
+*/
+/*
+#define SL_PLATFORM_EXTERNAL_SPAWN
+*/
+
+#ifdef SL_PLATFORM_EXTERNAL_SPAWN
+#define sl_Spawn(pEntry, pValue, flags)
+#endif
+
+/*!
+
+ Close the Doxygen group.
+ @}
+
+ */
+
+/*!
+ ******************************************************************************
+
+ \defgroup porting_events Porting - Event Handlers
+
+ This section includes the asynchronous event handlers routines
+
+ PORTING ACTION:
+ -Uncomment the required handler and define your routine as the value
+ of this handler
+
+ @{
+
+ ******************************************************************************
+ */
+
+/*!
+ \brief
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+/*
+#define sl_GeneralEvtHdlr
+ */
+
+/*!
+ \brief An event handler for WLAN connection or disconnection
+ indication
+ This event handles async WLAN events.
+ Possible events are:
+ SL_WLAN_CONNECT_EVENT - indicates WLAN is connected
+ SL_WLAN_DISCONNECT_EVENT - indicates WLAN is disconnected
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+#define sl_WlanEvtHdlr SimpleLinkWlanEventHandler
+
+/*!
+ \brief An event handler for IP address asynchronous event. Usually
+ accepted after new WLAN connection.
+ This event handles networking events.
+ Possible events are:
+ SL_NETAPP_IPV4_ACQUIRED - IP address was acquired (DHCP or
+ Static)
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+
+#define sl_NetAppEvtHdlr SimpleLinkNetAppEventHandler
+
+/*!
+ \brief A callback for HTTP server events.
+ Possible events are:
+ SL_NETAPP_HTTPGETTOKENVALUE - NWP requests to get the value of
+ a specific token SL_NETAPP_HTTPPOSTTOKENVALUE - NWP post to the
+ host a new value for a specific token
+
+ \param pServerEvent - Contains the relevant event information
+ (SL_NETAPP_HTTPGETTOKENVALUE or SL_NETAPP_HTTPPOSTTOKENVALUE)
+
+ \param pServerResponse - Should be filled by the user with the relevant
+ response information (i.e SL_NETAPP_HTTPSETTOKENVALUE as a
+ response to SL_NETAPP_HTTPGETTOKENVALUE event)
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+
+// #define sl_HttpServerCallback SimpleLinkHttpServerCallback
+/*!
+ \brief
+
+ \sa
+
+ \note belongs to \ref proting_sec
+
+ \warning
+*/
+/*
+#define sl_SockEvtHdlr
+*/
+
+/*!
+ \brief
+
+ \sa
+
+ \note belongs to \ref porting_sec
+
+ \warning
+*/
+
+#define sl_AsyncCmdHdlr SimpleLinkCmdHandler
+
+#define SL_STORE_RESTORE_CONTEXT
+#ifdef SL_STORE_RESTORE_CONTEXT
+#define sl_SuspenedStoreContext SimpleLinkSuspenedStoreContextHandler
+#define sl_ResumeRestoreContext SimpleLinkResumeRestoreContextHandler
+#endif
+
+/*!
+
+ Close the Doxygen group.
+ @}
+
+ */
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif // __USER_H__
diff --git a/examples/PIC32/mqtt_client/firmware/src/user_params.h b/examples/PIC32/mqtt_client/firmware/src/user_params.h
new file mode 100644
index 00000000..41536554
--- /dev/null
+++ b/examples/PIC32/mqtt_client/firmware/src/user_params.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2016 Cesanta Software Limited
+ * All rights reserved
+ */
+
+#ifndef _USER_PARAMS_H
+#define _USER_PARAMS_H
+
+#define NET_SSID "my_network"
+#define NET_PWD "my_password"
+#define NET_SECURITY SL_SEC_TYPE_WPA_WPA2
+
+#define MQTT_BROKER_ADDRESS "192.168.1.108:1883"
+#define MQTT_USER_NAME NULL
+#define MQTT_USER_PWD NULL
+
+#define CS_PORT PORT_CHANNEL_D
+#define CS_PIN PORTS_BIT_POS_14
+
+#define HIB_PORT PORT_CHANNEL_D
+#define HIB_PIN PORTS_BIT_POS_4
+
+#endif /* _USER_PARAMS_H */
diff --git a/mongoose.h b/mongoose.h
index 825a7cf0..1726c1cf 100644
--- a/mongoose.h
+++ b/mongoose.h
@@ -468,6 +468,7 @@ unsigned long os_random(void);
#include
#include
+#undef timeval
typedef int sock_t;
#define INVALID_SOCKET (-1)