Revert "Stop publish examples to mongoose repo"

This reverts commit 1a17e17c462bdd4e1d26d8742f8b7087273e04c2.

PUBLISHED_FROM=80028de308c9a021955d1425d2bfee8feb85f193
This commit is contained in:
Alexander Alashkin authored and Cesanta Bot committed 2017-02-06 14:08:59 +00:00
1 parent 7cc7df8c0e
commit eaef5bd133
351 files changed
+195424

No files matched your search

@@ -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
@@ -0,0 +1,9 @@
#
#Wed Oct 26 16:05:10 EEST 2016
pic32mx_eth_sk2_encx24j600.languagetoolchain.dir=/opt/microchip/xc32/v1.42/bin
pic32mx_eth_sk2_encx24j600.com-microchip-mplab-nbide-toolchainXC32-XC32LanguageToolchain.md5=7787462309de955deefcc6f5508f88a9
pic32mx_eth_sk2_encx24j600.languagetoolchain.version=1.42
configurations-xml=2f70242829ecb692b68d01a3f7c4e1e7
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=02b44c60b7ea0aab28d65f169487b894
host.platform=linux
conf.ids=pic32mx_eth_sk2_encx24j600
@@ -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=http_server.X
# Active Configuration
DEFAULTCONF=pic32mx_eth_sk2_encx24j600
CONF=${DEFAULTCONF}
# All Configurations
ALLCONFS=pic32mx_eth_sk2_encx24j600
# 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=pic32mx_eth_sk2_encx24j600 clean
# all
.all-impl: .all-pre .depcheck-impl
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=pic32mx_eth_sk2_encx24j600 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
@@ -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
@@ -0,0 +1,13 @@
#
# Generated - do not edit!
#
# NOCDDL
#
CND_BASEDIR=`pwd`
# pic32mx_eth_sk2_encx24j600 configuration
CND_ARTIFACT_DIR_pic32mx_eth_sk2_encx24j600=dist/pic32mx_eth_sk2_encx24j600/production
CND_ARTIFACT_NAME_pic32mx_eth_sk2_encx24j600=http_server.X.production.hex
CND_ARTIFACT_PATH_pic32mx_eth_sk2_encx24j600=dist/pic32mx_eth_sk2_encx24j600/production/http_server.X.production.hex
CND_PACKAGE_DIR_pic32mx_eth_sk2_encx24j600=${CND_DISTDIR}/pic32mx_eth_sk2_encx24j600/package
CND_PACKAGE_NAME_pic32mx_eth_sk2_encx24j600=httpserver.x.tar
CND_PACKAGE_PATH_pic32mx_eth_sk2_encx24j600=${CND_DISTDIR}/pic32mx_eth_sk2_encx24j600/package/httpserver.x.tar
@@ -0,0 +1,73 @@
#!/bin/bash -x
#
# Generated - do not edit!
#
# Macros
TOP=`pwd`
CND_CONF=pic32mx_eth_sk2_encx24j600
CND_DISTDIR=dist
TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/http_server.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
OUTPUT_BASENAME=http_server.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
PACKAGE_TOP_DIR=httpserver.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}/httpserver.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/httpserver.x.tar
cd ${TMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/httpserver.x.tar *
checkReturnCode
# Cleanup
cd "${TOP}"
rm -rf ${TMPDIR}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="62">
<projectmakefile>Makefile</projectmakefile>
<defaultConf>0</defaultConf>
<confs>
<conf name="pic32mx_eth_sk2_encx24j600" type="2">
<platformToolSN>:=MPLABComm-USB-Microchip:=&lt;vid>04D8:=&lt;pid>8107:=&lt;rev>0002:=&lt;man>Microchip Technology Incorporated:=&lt;prod>Explorer 16/32 PICkit on Board:=&lt;sn>BUR162971352:=&lt;drv>x:=&lt;xpt>h:=end</platformToolSN>
<languageToolchainDir>/opt/microchip/xc32/v1.42/bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>
<placeholder2>place holder 2</placeholder2>
</mdbdebugger>
<runprofile version="6">
<args></args>
<rundir></rundir>
<buildfirst>true</buildfirst>
<console-type>0</console-type>
<terminal-type>0</terminal-type>
<remove-instrumentation>0</remove-instrumentation>
<environment>
</environment>
</runprofile>
</conf>
</confs>
</configurationDescriptor>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/home/alex/go/src/cesanta.com/mongoose/examples/PIC32/http_server/firmware/src/app.c</file>
<file>file:/home/alex/go/src/cesanta.com/mongoose/examples/PIC32/http_server/firmware/src/app.h</file>
</group>
</open-files>
</project-private>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
<configuration>
<Harmony xmlns="Harmony" MHC="true"/>
<data xmlns="http://www.netbeans.org/ns/make-project/1">
<name>http_server</name>
<creation-uuid>e54023e9-3948-44ef-bf6f-29d8b223e555</creation-uuid>
<make-project-type>0</make-project-type>
<c-extensions>c</c-extensions>
<cpp-extensions/>
<header-extensions>h</header-extensions>
<asminc-extensions/>
<sourceEncoding>ISO-8859-1</sourceEncoding>
<make-dep-projects/>
</data>
</configuration>
</project>
@@ -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"
@@ -0,0 +1,279 @@
/* clang-format off */
/*******************************************************************************
MPLAB Harmony Application Source File
Company:
Microchip Technology Inc.
File Name:
app.c
Summary:
This file contains the source code for the MPLAB Harmony application.
Description:
This file contains the source code for the MPLAB Harmony application. It
implements the logic of the application's state machine and it may call
API routines of other MPLAB Harmony modules in the system, such as drivers,
system services, and middleware. However, it does not call any of the
system interfaces (such as the "Initialize" and "Tasks" functions) of any of
the modules in the system or make any assumptions about when those functions
are called. That is the responsibility of the configuration-specific system
files.
*******************************************************************************/
// 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
// *****************************************************************************
// *****************************************************************************
// Section: Included Files
// *****************************************************************************
// *****************************************************************************
#include "app.h"
#include "./../../../../../mongoose.h"
// *****************************************************************************
// *****************************************************************************
// Section: Global Data Definitions
// *****************************************************************************
// *****************************************************************************
// *****************************************************************************
/* Application Data
Summary:
Holds application data
Description:
This structure holds the application's data.
Remarks:
This structure should be initialized by the APP_Initialize function.
Application strings and buffers are be defined outside this structure.
*/
APP_DATA appData;
struct mg_mgr mgr;
// *****************************************************************************
// *****************************************************************************
// Section: Application Callback Functions
// *****************************************************************************
// *****************************************************************************
/* TODO: Add any necessary callback funtions.
*/
// *****************************************************************************
// *****************************************************************************
// Section: Application Local Functions
// *****************************************************************************
// *****************************************************************************
// *****************************************************************************
// *****************************************************************************
// Section: Application Initialization and State Machine Functions
// *****************************************************************************
// *****************************************************************************
/*******************************************************************************
Function:
void APP_Initialize ( void )
Remarks:
See prototype in app.h.
*/
const char *s_http_port = "8000";
void ev_handler(struct mg_connection *nc, int ev, void *ev_data) {
switch (ev) {
case MG_EV_ACCEPT: {
char addr[32];
mg_sock_addr_to_str(&nc->sa, addr, sizeof(addr),
MG_SOCK_STRINGIFY_IP | MG_SOCK_STRINGIFY_PORT);
SYS_PRINT("%p: Connection from %s\r\n", nc, addr);
break;
}
case MG_EV_HTTP_REQUEST: {
struct http_message *hm = (struct http_message *) ev_data;
char addr[32];
mg_sock_addr_to_str(&nc->sa, addr, sizeof(addr),
MG_SOCK_STRINGIFY_IP | MG_SOCK_STRINGIFY_PORT);
SYS_PRINT("%p: %.*s %.*s\r\n", nc, (int) hm->method.len, hm->method.p,
(int) hm->uri.len, hm->uri.p);
mg_send_response_line(nc, 200,
"Content-Type: text/html\r\n"
"Connection: close");
mg_printf(nc,
"\r\n<h1>Hello, %s!</h1>\r\n"
"You asked for %.*s\r\n",
addr, (int) hm->uri.len, hm->uri.p);
nc->flags |= MG_F_SEND_AND_CLOSE;
break;
}
case MG_EV_CLOSE: {
SYS_PRINT("%p: Connection closed\r\n", nc);
break;
}
}
}
void APP_Initialize ( void )
{
/* Place the App state machine in its initial state. */
appData.state = APP_STATE_INIT;
mg_mgr_init(&mgr, NULL);
}
/******************************************************************************
Function:
void APP_Tasks ( void )
Remarks:
See prototype in app.h.
*/
void APP_Tasks ( void )
{
SYS_STATUS tcpipStat;
const char *netName, *netBiosName;
static IPV4_ADDR dwLastIP[2] = { {-1}, {-1} };
IPV4_ADDR ipAddr;
TCPIP_NET_HANDLE netH;
int i, nNets;
/* Check the application's current state. */
switch ( appData.state )
{
/* Application's initial state. */
case APP_STATE_INIT:
{
tcpipStat = TCPIP_STACK_Status(sysObj.tcpip);
if(tcpipStat < 0)
{ // some error occurred
SYS_CONSOLE_MESSAGE(" APP: TCP/IP stack initialization failed!\r\n");
appData.state = APP_DONE;
}
else if(tcpipStat == SYS_STATUS_READY)
{
// now that the stack is ready we can check the
// available interfaces
nNets = TCPIP_STACK_NumberOfNetworksGet();
for(i = 0; i < nNets; i++)
{
netH = TCPIP_STACK_IndexToNet(i);
netName = TCPIP_STACK_NetNameGet(netH);
netBiosName = TCPIP_STACK_NetBIOSName(netH);
#if defined(TCPIP_STACK_USE_NBNS)
SYS_CONSOLE_PRINT(" Interface %s on host %s - NBNS enabled\r\n", netName, netBiosName);
#else
SYS_CONSOLE_PRINT(" Interface %s on host %s - NBNS disabled\r\n", netName, netBiosName);
#endif // defined(TCPIP_STACK_USE_NBNS)
}
appData.state = APP_TCPIP_WAIT_FOR_IP;
}
break;
}
case APP_TCPIP_WAIT_FOR_IP:
// if the IP address of an interface has changed
// display the new value on the system console
nNets = TCPIP_STACK_NumberOfNetworksGet();
for (i = 0; i < nNets; i++)
{
netH = TCPIP_STACK_IndexToNet(i);
ipAddr.Val = TCPIP_STACK_NetAddress(netH);
if(dwLastIP[i].Val != ipAddr.Val)
{
dwLastIP[i].Val = ipAddr.Val;
SYS_CONSOLE_MESSAGE(TCPIP_STACK_NetNameGet(netH));
SYS_CONSOLE_MESSAGE(" IP Address: ");
SYS_CONSOLE_PRINT("%d.%d.%d.%d \r\n", ipAddr.v[0], ipAddr.v[1], ipAddr.v[2], ipAddr.v[3]);
if (ipAddr.v[0] != 0 && ipAddr.v[0] != 169) // Wait for a Valid IP
{
appData.state = APP_START_LISTENING;
}
}
}
break;
case APP_START_LISTENING:
{
SYS_CONSOLE_PRINT("Starting listening on port 8000\r\n");
struct mg_connection *nc = mg_bind(&mgr, "8000", ev_handler); // Create listening connection and add it to the event manager
if (nc == NULL) {
SYS_CONSOLE_PRINT("Failed to create listener\n\r");
appData.state = APP_DONE;
break;
}
mg_set_protocol_http_websocket(nc);
SYS_CONSOLE_PRINT("Listener started\r\n");
appData.state = APP_POLL;
break;
}
case APP_POLL:
{
mg_mgr_poll(&mgr, 1000);
break;
}
case APP_DONE:
{
SYS_CONSOLE_PRINT("Server stopped\n\r");
appData.state = APP_EMPTY;
break;
}
case APP_EMPTY:
{
break;
}
/* The default state should never be executed. */
default:
{
/* TODO: Handle error in application's state machine. */
break;
}
}
}
/*******************************************************************************
End of File
*/
@@ -0,0 +1,213 @@
/* clang-format off */
/*******************************************************************************
MPLAB Harmony Application Header File
Company:
Microchip Technology Inc.
File Name:
app.h
Summary:
This header file provides prototypes and definitions for the application.
Description:
This header file provides function prototypes and data type definitions for
the application. Some of these are required by the system (such as the
"APP_Initialize" and "APP_Tasks" prototypes) and some of them are only used
internally by the application (such as the "APP_STATES" definition). Both
are defined here for convenience.
*******************************************************************************/
//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 _APP_H
#define _APP_H
// *****************************************************************************
// *****************************************************************************
// Section: Included Files
// *****************************************************************************
// *****************************************************************************
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include "system_config.h"
#include "system_definitions.h"
// *****************************************************************************
// *****************************************************************************
// Section: Type Definitions
// *****************************************************************************
// *****************************************************************************
// *****************************************************************************
/* 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
{
/* Application's state machine's initial state. */
APP_STATE_INIT=0,
APP_TCPIP_WAIT_FOR_IP,
APP_START_LISTENING,
APP_DONE,
APP_EMPTY,
APP_POLL
} 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;
/* TODO: Define any additional data used by the application. */
TCP_SOCKET socket;
char * host;
char * path;
uint16_t port;
} APP_DATA;
// *****************************************************************************
// *****************************************************************************
// Section: Application Callback Routines
// *****************************************************************************
// *****************************************************************************
/* These routines are called by drivers when certain events occur.
*/
// *****************************************************************************
// *****************************************************************************
// Section: Application Initialization and State Machine Functions
// *****************************************************************************
// *****************************************************************************
/*******************************************************************************
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:
<code>
APP_Initialize();
</code>
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:
<code>
APP_Tasks();
</code>
Remarks:
This routine must be called from SYS_Tasks() routine.
*/
void APP_Tasks ( void );
#endif /* _APP_H */
/*******************************************************************************
End of File
*/
@@ -0,0 +1,92 @@
/* clang-format off */
/*******************************************************************************
MPLAB Harmony Project Main Source File
Company:
Microchip Technology Inc.
File Name:
main.c
Summary:
This file contains the "main" function for an MPLAB Harmony project.
Description:
This file contains the "main" function for an MPLAB Harmony project. The
"main" function calls the "SYS_Initialize" function to initialize the state
machines of all MPLAB Harmony modules in the system and it calls the
"SYS_Tasks" function from within a system-wide "super" loop to maintain
their correct operation. These two functions are implemented in
configuration-specific files (usually "system_init.c" and "system_tasks.c")
in a configuration-specific folder under the "src/system_config" folder
within this project's top-level folder. An MPLAB Harmony project may have
more than one configuration, each contained within it's own folder under
the "system_config" folder.
*******************************************************************************/
// 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
// *****************************************************************************
// *****************************************************************************
// Section: Included Files
// *****************************************************************************
// *****************************************************************************
#include <stddef.h> // Defines NULL
#include <stdbool.h> // Defines true
#include <stdlib.h> // Defines EXIT_FAILURE
#include "system/common/sys_module.h" // SYS function prototypes
// *****************************************************************************
// *****************************************************************************
// Section: Main Entry Point
// *****************************************************************************
// *****************************************************************************
int main ( void )
{
/* Initialize all MPLAB Harmony modules, including application(s). */
SYS_Initialize ( NULL );
while ( true )
{
/* Maintain state machines of all polled MPLAB Harmony modules. */
SYS_Tasks ( );
}
/* Execution should not come here during normal operation */
return ( EXIT_FAILURE );
}
/*******************************************************************************
End of File
*/
@@ -0,0 +1,279 @@
/* clang-format off */
/*******************************************************************************
SPI Driver Interface Implementation
Company:
Microchip Technology Inc.
File Name:
drv_spi_api.i
Summary:
SPI Driver implementation for functions that the client API uses that change
depending on what compile time options there are.
Description:
The SPI Driver provides a interface to access the SPI hardware on the PIC32
microcontroller. This file implements the SPI Driver. This file
should be included in the project if SPI driver functionality is needed.
*******************************************************************************/
//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
#include "driver/spi/src/dynamic/drv_spi_internal.h"
#define _SPI_DRV_VTABLE_POLLED 0x0000
#define _SPI_DRV_VTABLE_ISR 0x0001
#define _SPI_DRV_VTABLE_SLAVE 0x0000
#define _SPI_DRV_VTABLE_MASTER 0x0002
#define _SPI_DRV_VTABLE_RM 0x0000
#define _SPI_DRV_VTABLE_EBM 0x0004
#define _SPI_DRV_VTABLE_8BIT 0x0008
#define _SPI_DRV_VTABLE_16BIT 0x0010
#define _SPI_DRV_VTABLE_32BIT 0x0020
#define _SPI_DRV_VTABLE_P_S_R_8 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_8BIT
#define _SPI_DRV_VTABLE_P_S_R_16 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_16BIT
#define _SPI_DRV_VTABLE_P_S_R_32 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_32BIT
#define _SPI_DRV_VTABLE_P_S_E_8 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_8BIT
#define _SPI_DRV_VTABLE_P_S_E_16 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_16BIT
#define _SPI_DRV_VTABLE_P_S_E_32 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_32BIT
#define _SPI_DRV_VTABLE_I_S_R_8 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_8BIT
#define _SPI_DRV_VTABLE_I_S_R_16 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_16BIT
#define _SPI_DRV_VTABLE_I_S_R_32 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_32BIT
#define _SPI_DRV_VTABLE_I_S_E_8 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_8BIT
#define _SPI_DRV_VTABLE_I_S_E_16 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_16BIT
#define _SPI_DRV_VTABLE_I_S_E_32 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_SLAVE | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_32BIT
#define _SPI_DRV_VTABLE_P_M_R_8 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_8BIT
#define _SPI_DRV_VTABLE_P_M_R_16 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_16BIT
#define _SPI_DRV_VTABLE_P_M_R_32 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_32BIT
#define _SPI_DRV_VTABLE_P_M_E_8 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_8BIT
#define _SPI_DRV_VTABLE_P_M_E_16 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_16BIT
#define _SPI_DRV_VTABLE_P_M_E_32 _SPI_DRV_VTABLE_POLLED | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_32BIT
#define _SPI_DRV_VTABLE_I_M_R_8 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_8BIT
#define _SPI_DRV_VTABLE_I_M_R_16 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_16BIT
#define _SPI_DRV_VTABLE_I_M_R_32 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_RM | _SPI_DRV_VTABLE_32BIT
#define _SPI_DRV_VTABLE_I_M_E_8 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_8BIT
#define _SPI_DRV_VTABLE_I_M_E_16 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_16BIT
#define _SPI_DRV_VTABLE_I_M_E_32 _SPI_DRV_VTABLE_ISR | _SPI_DRV_VTABLE_MASTER | _SPI_DRV_VTABLE_EBM | _SPI_DRV_VTABLE_32BIT
int32_t DRV_SPI_SetVTable(struct DRV_SPI_DRIVER_OBJECT * driverObject, const DRV_SPI_INIT * const pInit)
{
uint8_t mode = 0;
if (pInit->spiMode == DRV_SPI_MODE_MASTER)
{
mode = _SPI_DRV_VTABLE_MASTER;
}
else
{
SYS_ASSERT(false, "\r\nInvalid SPI Configuration.");
return -1;
}
if (pInit->taskMode == DRV_SPI_TASK_MODE_ISR)
{
mode |= DRV_SPI_TASK_MODE_ISR;
}
else
{
SYS_ASSERT(false, "\r\nInvalid SPI Configuration.");
return -1;
}
if (pInit->bufferType == DRV_SPI_BUFFER_TYPE_ENHANCED)
{
mode |= _SPI_DRV_VTABLE_EBM;
}
else
{
SYS_ASSERT(false, "\r\nInvalid SPI Configuration.");
return -1;
}
if (pInit->commWidth == SPI_COMMUNICATION_WIDTH_8BITS)
{
mode |= _SPI_DRV_VTABLE_8BIT;
}
else
{
SYS_ASSERT(false, "\r\nInvalid SPI Configuration.");
return -1;
}
switch (mode)
{
case _SPI_DRV_VTABLE_I_M_E_8:
driverObject->vfMainTask = DRV_SPI_ISRMasterEBM8BitTasks;
break;
default:
SYS_ASSERT(false, "\r\nInvalid SPI Configuration.");
return -1;
}
return 0;
}
int32_t DRV_SPI_SetupHardware(struct DRV_SPI_DRIVER_OBJECT * driverObject, const DRV_SPI_INIT * const init)
{
const register SPI_MODULE_ID spiId = init->spiId;
/* disable the SPI*/
PLIB_SPI_Disable(spiId);
/* Set up Master or Slave Mode*/
PLIB_SPI_MasterEnable ( spiId );
/* Set up if the SPI is allowed to run while the rest of the CPU is in idle mode*/
if (init->allowIdleRun)
{
PLIB_SPI_StopInIdleDisable( spiId );
}
else
{
PLIB_SPI_StopInIdleEnable( spiId );
}
/* Set up close Polarity and output data phase*/
switch(init->clockMode)
{
case DRV_SPI_CLOCK_MODE_IDLE_LOW_EDGE_RISE:
PLIB_SPI_ClockPolaritySelect( spiId, SPI_CLOCK_POLARITY_IDLE_LOW );
PLIB_SPI_OutputDataPhaseSelect( spiId, SPI_OUTPUT_DATA_PHASE_ON_IDLE_TO_ACTIVE_CLOCK );
break;
case DRV_SPI_CLOCK_MODE_IDLE_LOW_EDGE_FALL:
PLIB_SPI_ClockPolaritySelect( spiId, SPI_CLOCK_POLARITY_IDLE_LOW );
PLIB_SPI_OutputDataPhaseSelect( spiId, SPI_OUTPUT_DATA_PHASE_ON_ACTIVE_TO_IDLE_CLOCK );
break;
case DRV_SPI_CLOCK_MODE_IDLE_HIGH_EDGE_FALL: //TODO: Make sure these are right
PLIB_SPI_ClockPolaritySelect( spiId, SPI_CLOCK_POLARITY_IDLE_HIGH );
PLIB_SPI_OutputDataPhaseSelect( spiId, SPI_OUTPUT_DATA_PHASE_ON_IDLE_TO_ACTIVE_CLOCK );
break;
case DRV_SPI_CLOCK_MODE_IDLE_HIGH_EDGE_RISE:
PLIB_SPI_ClockPolaritySelect( spiId, SPI_CLOCK_POLARITY_IDLE_HIGH );
PLIB_SPI_OutputDataPhaseSelect( spiId, SPI_OUTPUT_DATA_PHASE_ON_ACTIVE_TO_IDLE_CLOCK );
break;
default:
SYS_ASSERT(false, "\r\nInvalid SPI Configuration.");
return -1;
}
// Set up the Input Sample Phase
PLIB_SPI_InputSamplePhaseSelect ( spiId, init->inputSamplePhase);
//Enable the SSx Pin on slave side if needed
if(init->spiMode == DRV_SPI_MODE_SLAVE && (init->spiProtocolType == DRV_SPI_PROTOCOL_TYPE_FRAMED || init->spiSlaveSSPin))
{
PLIB_SPI_PinEnable(spiId, SPI_PIN_SLAVE_SELECT);
}
else
{
PLIB_SPI_PinDisable(spiId, SPI_PIN_SLAVE_SELECT);
}
/* Communication Width Selection */
PLIB_SPI_CommunicationWidthSelect ( spiId, init->commWidth );
/* Baudrate selection */
PLIB_SPI_BaudRateSet( spiId , SYS_CLK_PeripheralFrequencyGet(init->spiClk), init->baudRate );
driverObject->currentBaudRate = init->baudRate;
driverObject->baudRate = init->baudRate;
switch (init->spiProtocolType)
{
case DRV_SPI_PROTOCOL_TYPE_STANDARD:
PLIB_SPI_FramedCommunicationDisable( spiId );
break;
case DRV_SPI_PROTOCOL_TYPE_FRAMED:
#if defined (PLIB_SPI_ExistsFrameSyncPulseDirection)
if (PLIB_SPI_ExistsFrameSyncPulseDirection(spiId))
{
PLIB_SPI_FrameSyncPulseDirectionSelect(spiId, init->framePulseDirection);
}
#endif
#if defined (PLIB_SPI_ExistsFrameSyncPulsePolarity)
if (PLIB_SPI_ExistsFrameSyncPulsePolarity(spiId))
{
PLIB_SPI_FrameSyncPulsePolaritySelect(spiId, init->framePulsePolarity);
}
#endif
#if defined (PLIB_SPI_ExistsFrameSyncPulseEdge)
if (PLIB_SPI_ExistsFrameSyncPulseEdge(spiId))
{
PLIB_SPI_FrameSyncPulseEdgeSelect(spiId, init->framePulseEdge);
}
#endif
#if defined (PLIB_SPI_ExistsFrameSyncPulseWidth)
if (PLIB_SPI_ExistsFrameSyncPulseWidth(spiId))
{
PLIB_SPI_FrameSyncPulseWidthSelect(spiId, init->framePulseWidth);
}
#endif
#if defined (PLIB_SPI_ExistsFrameSyncPulseCounter)
if (PLIB_SPI_ExistsFrameSyncPulseCounter(spiId))
{
PLIB_SPI_FrameSyncPulseCounterSelect(spiId, init->frameSyncPulse);
}
#endif
PLIB_SPI_FramedCommunicationEnable( spiId );
break;
case DRV_SPI_PROTOCOL_TYPE_AUDIO:
PLIB_SPI_FramedCommunicationDisable( spiId );
{
SYS_ASSERT(false, "\r\nInvalid SPI Configuration.");
return -1;
}
break;
default:
SYS_ASSERT(false, "\r\nInvalid SPI Configuration.");
return -1;
}
PLIB_SPI_FIFOEnable( spiId );
PLIB_SPI_FIFOInterruptModeSelect(spiId, SPI_FIFO_INTERRUPT_WHEN_TRANSMIT_BUFFER_IS_COMPLETELY_EMPTY);
PLIB_SPI_FIFOInterruptModeSelect(spiId, SPI_FIFO_INTERRUPT_WHEN_RECEIVE_BUFFER_IS_NOT_EMPTY);
PLIB_SPI_BufferClear( spiId );
PLIB_SPI_ReceiverOverflowClear ( spiId );
// Note: We do not enable the SPI here, that will be done by the first client.
return 0;
}
@@ -0,0 +1,196 @@
/* clang-format off */
/*******************************************************************************
SPI Driver Functions for Dynamic Standard Buffer Driver Tasks Functions
Company:
Microchip Technology Inc.
File Name:
drv_spi_dynamic_master_dma_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_dynamic_ebm_tasks.c.ftl
*******************************************************************************/
//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 "driver/spi/src/dynamic/drv_spi_internal.h"
#include <stdbool.h>
void DRV_SPI_MasterDMASendDummy8BitISR(SYS_DMA_TRANSFER_EVENT event, SYS_DMA_CHANNEL_HANDLE handle, uintptr_t contextHandle)
{
if (event != SYS_DMA_TRANSFER_EVENT_COMPLETE)
{
// Ignore for now
return;
}
struct DRV_SPI_DRIVER_OBJECT * pDrvInstance = (struct DRV_SPI_DRIVER_OBJECT *)contextHandle;
DRV_SPI_JOB_OBJECT * currentJob = pDrvInstance->currentJob;
if (currentJob->dummyLeftToTx != 0)
{
uint8_t * ptr = sDrvSpiTxDummy;
uint32_t len = MIN(MIN(MIN(PLIB_DMA_MAX_TRF_SIZE, currentJob->dummyLeftToTx), DRV_SPI_DMA_TXFER_SIZE), DRV_SPI_DMA_DUMMY_BUFFER_SIZE);
void * spiPtr = PLIB_SPI_BufferAddressGet(pDrvInstance->spiId);
SYS_DMA_ChannelTransferAdd(pDrvInstance->txDmaChannelHandle, ptr, len, spiPtr, 1, 1);
currentJob->txDMAProgressStage = DRV_SPI_DMA_DUMMY_INPROGRESS;
currentJob->dummyLeftToTx -= len;
}
else
{
// Job is done
currentJob->txDMAProgressStage = DRV_SPI_DMA_COMPLETE;
}
}
void DRV_SPI_MasterDMASendData8BitISR(SYS_DMA_TRANSFER_EVENT event, SYS_DMA_CHANNEL_HANDLE handle, uintptr_t contextHandle)
{
if (event != SYS_DMA_TRANSFER_EVENT_COMPLETE)
{
// Ignore for now
return;
}
struct DRV_SPI_DRIVER_OBJECT * pDrvInstance = (struct DRV_SPI_DRIVER_OBJECT *)contextHandle;
DRV_SPI_JOB_OBJECT * currentJob = pDrvInstance->currentJob;
if (currentJob->dataLeftToTx != 0)
{
uint8_t * ptr = &(currentJob->txBuffer[currentJob->dataTxed]);
uint32_t len = MIN(MIN(PLIB_DMA_MAX_TRF_SIZE, currentJob->dataLeftToTx), DRV_SPI_DMA_TXFER_SIZE);
void * spiPtr = PLIB_SPI_BufferAddressGet(pDrvInstance->spiId);
SYS_DMA_ChannelTransferAdd(pDrvInstance->txDmaChannelHandle, ptr, len, spiPtr, 1, 1);
currentJob->txDMAProgressStage = DRV_SPI_DMA_DATA_INPROGRESS;
currentJob->dataLeftToTx -= len;
currentJob->dataTxed += len;
}
else
{
// Job is done
currentJob->txDMAProgressStage = DRV_SPI_DMA_COMPLETE;
}
}
void DRV_SPI_ISRDMAMasterSendEventHandler8bit(SYS_DMA_TRANSFER_EVENT event, SYS_DMA_CHANNEL_HANDLE handle, uintptr_t contextHandle)
{
struct DRV_SPI_DRIVER_OBJECT * pDrvInstance = (struct DRV_SPI_DRIVER_OBJECT * )contextHandle;
register DRV_SPI_JOB_OBJECT * currentJob = pDrvInstance->currentJob;
switch(currentJob->txDMAProgressStage)
{
case DRV_SPI_DMA_DATA_INPROGRESS:
DRV_SPI_MasterDMASendData8BitISR(event, handle, contextHandle);
break;
case DRV_SPI_DMA_DUMMY_INPROGRESS:
DRV_SPI_MasterDMASendDummy8BitISR(event, handle, contextHandle);
break;
default:
break;
}
}
void DRV_SPI_MasterDMAReceiveDummy8BitISR(SYS_DMA_TRANSFER_EVENT event, SYS_DMA_CHANNEL_HANDLE handle, uintptr_t contextHandle)
{
if (event != SYS_DMA_TRANSFER_EVENT_COMPLETE)
{
// Ignore for now
return;
}
struct DRV_SPI_DRIVER_OBJECT * pDrvInstance = (struct DRV_SPI_DRIVER_OBJECT *)contextHandle;
DRV_SPI_JOB_OBJECT * currentJob = pDrvInstance->currentJob;
if (currentJob->dummyLeftToRx != 0)
{
uint8_t * ptr = sDrvSpiRxDummy;
uint32_t len = MIN(MIN(MIN(PLIB_DMA_MAX_TRF_SIZE, currentJob->dummyLeftToRx), DRV_SPI_DMA_TXFER_SIZE), DRV_SPI_DMA_DUMMY_BUFFER_SIZE);
void * spiPtr = PLIB_SPI_BufferAddressGet(pDrvInstance->spiId);
SYS_DMA_ChannelTransferAdd(pDrvInstance->rxDmaChannelHandle, spiPtr, 1, ptr, len, 1);
currentJob->rxDMAProgressStage = DRV_SPI_DMA_DUMMY_INPROGRESS;
currentJob->dummyLeftToRx -= len;
}
else
{
// Job is done
currentJob->rxDMAProgressStage = DRV_SPI_DMA_COMPLETE;
SYS_INT_SourceEnable(pDrvInstance->rxInterruptSource);
}
}
void DRV_SPI_MasterDMAReceiveData8BitISR(SYS_DMA_TRANSFER_EVENT event, SYS_DMA_CHANNEL_HANDLE handle, uintptr_t contextHandle)
{
if (event != SYS_DMA_TRANSFER_EVENT_COMPLETE)
{
// Ignore for now
return;
}
struct DRV_SPI_DRIVER_OBJECT * pDrvInstance = (struct DRV_SPI_DRIVER_OBJECT *)contextHandle;
DRV_SPI_JOB_OBJECT * currentJob = pDrvInstance->currentJob;
if (currentJob->dataLeftToRx != 0)
{
uint8_t * ptr = &(currentJob->rxBuffer[currentJob->dataRxed]);
uint32_t len = MIN(MIN(PLIB_DMA_MAX_TRF_SIZE, currentJob->dataLeftToRx), DRV_SPI_DMA_TXFER_SIZE);
void * spiPtr = PLIB_SPI_BufferAddressGet(pDrvInstance->spiId);
SYS_DMA_ChannelTransferAdd(pDrvInstance->rxDmaChannelHandle, spiPtr, 1, ptr, len, 1);
currentJob->rxDMAProgressStage = DRV_SPI_DMA_DATA_INPROGRESS;
currentJob->dataLeftToRx -= len;
currentJob->dataRxed += len;
}
else
{
// Job is done
currentJob->rxDMAProgressStage = DRV_SPI_DMA_COMPLETE;
SYS_INT_SourceEnable(pDrvInstance->rxInterruptSource);
}
}
void DRV_SPI_ISRDMAMasterReceiveEventHandler8bit(SYS_DMA_TRANSFER_EVENT event, SYS_DMA_CHANNEL_HANDLE handle, uintptr_t contextHandle)
{
struct DRV_SPI_DRIVER_OBJECT * pDrvInstance = (struct DRV_SPI_DRIVER_OBJECT * )contextHandle;
register DRV_SPI_JOB_OBJECT * currentJob = pDrvInstance->currentJob;
switch(currentJob->rxDMAProgressStage)
{
case DRV_SPI_DMA_DATA_INPROGRESS:
DRV_SPI_MasterDMAReceiveData8BitISR(event, handle, contextHandle);
break;
case DRV_SPI_DMA_DUMMY_INPROGRESS:
DRV_SPI_MasterDMAReceiveDummy8BitISR(event, handle, contextHandle);
break;
default:
break;
}
}
@@ -0,0 +1,160 @@
/* clang-format off */
/*******************************************************************************
SPI Driver Functions for Dynamic Enhanced Buffer Driver Tasks Functions
Company:
Microchip Technology Inc.
File Name:
drv_spi_dynamic_ebm_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_dynamic_ebm_tasks.c.ftl
*******************************************************************************/
//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 "driver/spi/src/dynamic/drv_spi_internal.h"
#include <stdbool.h>
int32_t DRV_SPI_MasterEBMSend8BitISR( struct DRV_SPI_DRIVER_OBJECT * pDrvInstance )
{
register SPI_MODULE_ID spiId = pDrvInstance->spiId;
register DRV_SPI_JOB_OBJECT * currentJob = pDrvInstance->currentJob;
/* Determine the maximum number of bytes we can send to the FIFO*/
uint8_t symbolsInTransit = MAX(pDrvInstance->symbolsInProgress, PLIB_SPI_FIFOCountGet(spiId, SPI_FIFO_TYPE_TRANSMIT));
uint8_t bufferBytes = PLIB_SPI_TX_8BIT_FIFO_SIZE(spiId) - symbolsInTransit;
/* Figure out how much data we can send*/
size_t dataUnits = MIN(currentJob->dataLeftToTx, bufferBytes);
size_t counter;
if (dataUnits != 0)
{
/* Adjust the maximum buffer size downwards based on how much data we'll be sending*/
bufferBytes -= dataUnits;
currentJob->dataLeftToTx -= dataUnits;
/* Set the location in the buffer of where to start sending from*/
uint8_t *bufferLoc = &(currentJob->txBuffer[currentJob->dataTxed]);
for (counter = 0; counter < dataUnits; counter++)
{
/* Send a unit/symbol of data*/
PLIB_SPI_BufferWrite(spiId, bufferLoc[counter]);
}
/* Update the number of bytes transmitted*/
currentJob->dataTxed += dataUnits;
/* Adjust the symbols in progress */
pDrvInstance->symbolsInProgress += dataUnits;
}
size_t dummyUnits = MIN(currentJob->dummyLeftToTx, bufferBytes);
if (dummyUnits != 0)
{
currentJob->dummyLeftToTx -= dummyUnits;
/* Adjust the symbols in progress */
pDrvInstance->symbolsInProgress += dummyUnits;
for (counter = 0; counter < dummyUnits; counter++)
{
PLIB_SPI_BufferWrite(spiId, 0xff);
}
}
if (currentJob->dataLeftToTx + currentJob->dummyLeftToTx == 0)
{
/* We have no more data to send, turn off the TX interrupt*/
PLIB_SPI_FIFOInterruptModeSelect(spiId, SPI_FIFO_INTERRUPT_WHEN_TRANSMIT_BUFFER_IS_COMPLETELY_EMPTY);
pDrvInstance->txEnabled = false;
/* Turn on the RX Interrupt*/
pDrvInstance->rxEnabled = true;
}
return 0;
}
int32_t DRV_SPI_MasterEBMReceive8BitISR( struct DRV_SPI_DRIVER_OBJECT * pDrvInstance )
{
register SPI_MODULE_ID spiId = pDrvInstance->spiId;
register DRV_SPI_JOB_OBJECT * currentJob = pDrvInstance->currentJob;
/* Figure out how many bytes are waiting to be received."*/
uint8_t bufferBytes = PLIB_SPI_FIFOCountGet(spiId, SPI_FIFO_TYPE_RECEIVE);
/* Calculate the maximum number of data bytes that can be received*/
size_t dataUnits = MIN(currentJob->dataLeftToRx, bufferBytes);
size_t counter;
if (dataUnits != 0)
{
bufferBytes -= dataUnits;
currentJob->dataLeftToRx -= dataUnits;
/* Set the buffer location to receive bytes from the SPI to*/
uint8_t *bufferLoc = &(currentJob->rxBuffer[currentJob->dataRxed]);
for (counter = 0; counter < dataUnits; counter++)
{
/* Receive the data from the SPI */
bufferLoc[counter] = PLIB_SPI_BufferRead(spiId);
}
/* Adjust the amount of data that has been received */
currentJob->dataRxed += dataUnits;
/* Update the symbols in progress so we can send more units later */
pDrvInstance->symbolsInProgress -= dataUnits;
}
/* Figure out the maximum number of dummy data to be received */
size_t dummyUnits = MIN(currentJob->dummyLeftToRx, bufferBytes);
if (dummyUnits != 0)
{
/* Lower the number of dummy bytes to be received */
currentJob->dummyLeftToRx -= dummyUnits;
pDrvInstance->symbolsInProgress -= dummyUnits;
for (counter = 0; counter < dummyUnits; counter++)
{
/* Receive and throw away the byte. 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(spiId);
}
}
/* Figure out how many bytes are left to be received */
size_t bytesLeft = currentJob->dataLeftToRx + currentJob->dummyLeftToRx;
/* If the bytes left are smaller than the HW mark we have to change the interrupt mode */
if (bytesLeft < PLIB_SPI_RX_8BIT_HW_MARK(spiId))
{
PLIB_SPI_FIFOInterruptModeSelect(spiId, SPI_FIFO_INTERRUPT_WHEN_RECEIVE_BUFFER_IS_NOT_EMPTY);
}
return 0;
}
@@ -0,0 +1,203 @@
/* clang-format off */
/*******************************************************************************
SPI Driver Functions for Dynamic Driver Tasks Functions
Company:
Microchip Technology Inc.
File Name:
drv_spi_dynamic_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_dynamic_tasks.c.ftl
*******************************************************************************/
//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 "driver/spi/src/dynamic/drv_spi_internal.h"
#include <stdbool.h>
int32_t DRV_SPI_ISRMasterEBM8BitTasks ( struct DRV_SPI_DRIVER_OBJECT * pDrvInstance )
{
volatile bool continueLoop;
/* Disable the interrupts */
SYS_INT_SourceDisable(pDrvInstance->rxInterruptSource);
SYS_INT_SourceDisable(pDrvInstance->txInterruptSource);
SYS_INT_SourceDisable(pDrvInstance->errInterruptSource);
do {
DRV_SPI_JOB_OBJECT * currentJob = pDrvInstance->currentJob;
SPI_MODULE_ID spiId = pDrvInstance->spiId;
/* Check for a new task */
if (pDrvInstance->currentJob == NULL)
{
if (DRV_SPI_SYS_QUEUE_Dequeue(pDrvInstance->queue, (void *)&(pDrvInstance->currentJob)) != DRV_SPI_SYS_QUEUE_SUCCESS)
{
SYS_ASSERT(false, "\r\nSPI Driver: Error in dequeing.");
return 0;
}
if (pDrvInstance->currentJob == NULL)
{
pDrvInstance->txEnabled = false;
return 0;
}
currentJob = pDrvInstance->currentJob;
pDrvInstance->symbolsInProgress = 0;
/* Call the operation starting function pointer. This can be used to modify the slave select lines */
DRV_SPI_CLIENT_OBJECT * pClient = (DRV_SPI_CLIENT_OBJECT*)currentJob->pClient;
if (pClient->operationStarting != NULL)
{
(*pClient->operationStarting)(DRV_SPI_BUFFER_EVENT_PROCESSING, (DRV_SPI_BUFFER_HANDLE)currentJob, currentJob->context);
}
/* Check the baud rate. If its different set the new baud rate*/
if (pClient->baudRate != pDrvInstance->currentBaudRate)
{
PLIB_SPI_BaudRateSet( spiId , SYS_CLK_PeripheralFrequencyGet(pDrvInstance->spiClk), pClient->baudRate );
pDrvInstance->currentBaudRate = pClient->baudRate;
}
/* List the new job as processing*/
currentJob->status = DRV_SPI_BUFFER_EVENT_PROCESSING;
if (currentJob->dataLeftToTx +currentJob->dummyLeftToTx > PLIB_SPI_RX_8BIT_FIFO_SIZE(spiId))
{
PLIB_SPI_FIFOInterruptModeSelect(spiId, SPI_FIFO_INTERRUPT_WHEN_TRANSMIT_BUFFER_IS_1HALF_EMPTY_OR_MORE);
PLIB_SPI_FIFOInterruptModeSelect(spiId, SPI_FIFO_INTERRUPT_WHEN_RECEIVE_BUFFER_IS_1HALF_FULL_OR_MORE);
}
/* Flush out the Receive buffer */
PLIB_SPI_BufferClear(spiId);
}
continueLoop = false;
/* Execute the sub tasks */
if
(currentJob->dataLeftToTx +currentJob->dummyLeftToTx != 0)
{
DRV_SPI_MasterEBMSend8BitISR(pDrvInstance);
}
DRV_SPI_ISRErrorTasks(pDrvInstance);
/* 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_SPI_MasterEBMReceive8BitISR(pDrvInstance);
bytesLeft = currentJob->dataLeftToRx + currentJob->dummyLeftToRx;
}
if (bytesLeft == 0)
{
// Disable the interrupt, or more correctly don't re-enable it later*/
pDrvInstance->rxEnabled = false;
/* 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.
The job complete callback can be used to free a client that is blocked
waiting for complete*/
DRV_SPI_CLIENT_OBJECT * pClient = (DRV_SPI_CLIENT_OBJECT*)currentJob->pClient;
if (pClient->operationEnded != NULL)
{
(*pClient->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_FreeElement(pDrvInstance->queue, currentJob) != DRV_SPI_SYS_QUEUE_SUCCESS)
{
SYS_ASSERT(false, "\r\nSPI Driver: Queue free element error.");
return 0;
}
/* Clean up */
pDrvInstance->currentJob = NULL;
if (!DRV_SPI_SYS_QUEUE_IsEmpty(pDrvInstance->queue))
{
continueLoop = true;
continue;
}
else
{
break;
}
}
/* Check to see if the interrupts would fire again if so just go back into
the loop instead of suffering the interrupt latency of exiting and re-entering*/
if (pDrvInstance->currentJob != NULL)
{
/* Clear the Interrupts */
SYS_INT_SourceStatusClear(pDrvInstance->rxInterruptSource);
SYS_INT_SourceStatusClear(pDrvInstance->txInterruptSource);
SYS_INT_SourceStatusClear(pDrvInstance->errInterruptSource);
/* Interrupts should immediately become active again if they're in a fired condition */
if ((SYS_INT_SourceStatusGet(pDrvInstance->rxInterruptSource)) ||
(SYS_INT_SourceStatusGet(pDrvInstance->txInterruptSource)) ||
(SYS_INT_SourceStatusGet(pDrvInstance->errInterruptSource)))
{
/* Interrupt would fire again anyway so we should just go back to the start*/
continueLoop = true;
continue;
}
/* If we're here then we know that the interrupt should not be firing again immediately, so re-enable them and exit*/
SYS_INT_SourceEnable(pDrvInstance->rxInterruptSource);
SYS_INT_SourceEnable(pDrvInstance->txInterruptSource);
return 0;
}
} while(continueLoop);
/* if we're here it means that we have no more jobs in the queue, tx and rx interrupts will be re-enabled by the BufferAdd* functions*/
SYS_INT_SourceStatusClear(pDrvInstance->rxInterruptSource);
SYS_INT_SourceStatusClear(pDrvInstance->txInterruptSource);
return 0;
}
@@ -0,0 +1,294 @@
/* clang-format off */
/*******************************************************************************
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:
<code>
uint32_t sysClockHz;
sysClockHz = SYS_CLK_SystemFrequencyGet ( );
</code>
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:
<code>
unsigned long peripheralClockHz;
peripheralClockHz = SYS_CLK_PeripheralFrequencyGet ( CLK_BUS_PERIPHERAL_5 );
</code>
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:
<code>
unsigned long sysClockOutputHz;
sysClockOutputHz = SYS_CLK_ReferenceClockFrequencyGet ( CLK_BUS_REFERENCE_3 );
</code>
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));
}
@@ -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
*/
@@ -0,0 +1,871 @@
/* 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);
/* PORT A Initialization */
PLIB_PORTS_OpenDrainEnable(PORTS_ID_0, PORT_CHANNEL_A, SYS_PORT_A_ODC);
PLIB_PORTS_Write( PORTS_ID_0, PORT_CHANNEL_A, SYS_PORT_A_LAT);
PLIB_PORTS_DirectionOutputSet( PORTS_ID_0, PORT_CHANNEL_A, SYS_PORT_A_TRIS ^ 0xFFFF);
/* PORT B Initialization */
PLIB_PORTS_OpenDrainEnable(PORTS_ID_0, PORT_CHANNEL_B, SYS_PORT_B_ODC);
PLIB_PORTS_Write( PORTS_ID_0, PORT_CHANNEL_B, SYS_PORT_B_LAT);
PLIB_PORTS_DirectionOutputSet( PORTS_ID_0, PORT_CHANNEL_B, SYS_PORT_B_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
*/
@@ -0,0 +1,865 @@
#
# Configuration generated by Microchip Harmony Configurator (MHC) v1.0.9.2
# Project name: http_server
# Configuration: pic32mx_eth_sk2_encx24j600
# Device: PIC32MX795F512L
# Harmony version: 1.09
#
#
# from /home/alex/go/src/cesanta.com/mongoose/examples/PIC32/http_server/firmware/http_server.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 /home/alex/go/src/cesanta.com/mongoose/examples/PIC32/http_server/firmware/http_server.hconfig
#
CONFIG_USE_EXCEPTION_HANDLER=y
CONFIG_EXCEPTION_USE_SYS_DEBUG=y
CONFIG_EXCEPTION_BREAKPOINT=y
#
# from $HARMONY_VERSION_PATH/framework/bluetooth/config/bluetooth.hconfig
#
CONFIG_USE_BLUETOOTH_LIBRARIES=n
#
# from $HARMONY_VERSION_PATH/framework/bootloader/config/bootloader.hconfig
#
CONFIG_USE_BOOTLOADER=n
#
# from $HARMONY_VERSION_PATH/framework/classb/config/classb.hconfig
#
CONFIG_USE_CLASSB=n
#
# from $HARMONY_VERSION_PATH/framework/crypto/config/crypto.hconfig
#
CONFIG_USE_CRYPTO_LIBRARY=n
CONFIG_USE_CRYPTO_LIB=n
#
# from $HARMONY_VERSION_PATH/framework/decoder/config/decoder.hconfig
#
CONFIG_USE_IMAGE_DECODER=n
CONFIG_USE_DECODER=n
#
# from $HARMONY_VERSION_PATH/framework/driver/adc/config/drv_adc.hconfig
#
CONFIG_USE_DRV_ADC=n
#
# from $HARMONY_VERSION_PATH/framework/driver/camera/config/drv_camera.hconfig
#
CONFIG_USE_DRV_CAMERA=n
#
# from $HARMONY_VERSION_PATH/framework/driver/can/config/drv_can.hconfig
#
CONFIG_USE_DRV_CAN=n
#
# from $HARMONY_VERSION_PATH/framework/driver/cmp/config/drv_cmp.hconfig
#
CONFIG_DRV_CVREF_ENABLE=n
CONFIG_USE_DRV_CMP=n
#
# from $HARMONY_VERSION_PATH/framework/driver/encx24j600/config/drv_encx24j600.hconfig
#
CONFIG_DRV_ENCX24J600_USE_DRIVER=y
CONFIG_DRV_ENCX24J600_INSTANCES_NUMBER=1
CONFIG_DRV_ENCX24J600_CLIENT_INSTANCES=1
#
# from $HARMONY_VERSION_PATH/framework/driver/encx24j600/config/drv_encx24j600_idx.ftl
#
CONFIG_DRV_ENCX24J600_IDX0=y
CONFIG_DRV_ENCX24J600_MAC_TX_DESCRIPTORS_IDX0=3
CONFIG_DRV_ENCX24J600_MAC_RX_DESCRIPTORS_IDX0=3
CONFIG_DRV_ENCX24J600_MAX_RX_BUFFER_IDX0=1536
CONFIG_DRV_ENCX24J600_SPI_DRV_INDEX_IDX0=0
CONFIG_DRV_ENCX24J600_SPI_BPS_IDX0=14000000
CONFIG_DRV_ENCX24J600_SPI_SS_PORT_MODULE_IDX0="PORTS_ID_0"
CONFIG_DRV_ENCX24J600_SPI_SS_PORT_CHANNEL_IDX0="PORT_CHANNEL_D"
CONFIG_DRV_ENCX24J600_SPI_SS_PORT_PIN_IDX0="PORTS_BIT_POS_14"
CONFIG_DRV_ENCX24J600_RX_BUFFER_SIZE_IDX0=16384
CONFIG_DRV_ENCX24J600_MAX_FRAME_SIZE_IDX0=1536
CONFIG_DRV_ENCX24J600_MAX_USE_AUTOMATIC_FLOW_CONTROL_IDX0=y
#
# from $HARMONY_VERSION_PATH/framework/driver/enc28j60/config/drv_enc28j60.hconfig
#
CONFIG_DRV_ENC28J60_USE_DRIVER=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_mac.hconfig
#
CONFIG_TCPIP_USE_ETH_MAC=y
CONFIG_TCPIP_EMAC_TX_DESCRIPTORS=8
CONFIG_TCPIP_EMAC_RX_DESCRIPTORS=6
CONFIG_TCPIP_EMAC_RX_DEDICATED_BUFFERS=4
CONFIG_TCPIP_EMAC_RX_INIT_BUFFERS=0
CONFIG_TCPIP_EMAC_RX_LOW_THRESHOLD=1
CONFIG_TCPIP_EMAC_RX_LOW_FILL=2
CONFIG_TCPIP_EMAC_RX_BUFF_SIZE=1536
CONFIG_TCPIP_EMAC_RX_MAX_FRAME=1536
CONFIG_TCPIP_EMAC_RX_FRAGMENTS=1
CONFIG_TCPIP_EMAC_ETH_FILTER_BCAST_ACCEPT=y
CONFIG_TCPIP_EMAC_ETH_FILTER_MCAST_ACCEPT=y
CONFIG_TCPIP_EMAC_ETH_FILTER_UCAST_ACCEPT=y
CONFIG_TCPIP_EMAC_ETH_FILTER_UCAST_OTHER_ACCEPT=n
CONFIG_TCPIP_EMAC_ETH_FILTER_RUNT_REJECT=y
CONFIG_TCPIP_EMAC_ETH_FILTER_RUNT_ACCEPT=n
CONFIG_TCPIP_EMAC_ETH_FILTER_CRC_ERROR_REJECT=y
CONFIG_TCPIP_EMAC_ETH_FILTER_CRC_ERROR_ACCEPT=n
CONFIG_TCPIP_EMAC_ETH_OF_AUTO_NEGOTIATION=y
CONFIG_TCPIP_EMAC_ETH_OF_FULL_DUPLEX=y
CONFIG_TCPIP_EMAC_ETH_OF_HALF_DUPLEX=y
CONFIG_TCPIP_EMAC_ETH_OF_100=y
CONFIG_TCPIP_EMAC_ETH_OF_10=y
CONFIG_TCPIP_EMAC_ETH_OF_HUGE_PKTS=n
CONFIG_TCPIP_EMAC_ETH_OF_MAC_LOOPBACK=n
CONFIG_TCPIP_EMAC_ETH_OF_PHY_LOOPBACK=n
CONFIG_TCPIP_EMAC_ETH_OF_MDIX_AUTO=y
CONFIG_TCPIP_EMAC_ETH_OF_RMII=n
CONFIG_TCPIP_EMAC_PHY_CONFIG_RMII=n
CONFIG_TCPIP_EMAC_PHY_CONFIG_ALTERNATE=n
CONFIG_TCPIP_EMAC_PHY_CONFIG_AUTO=y
CONFIG_TCPIP_EMAC_PHY_LINK_INIT_DELAY=500
CONFIG_TCPIP_EMAC_PHY_ADDRESS=0
CONFIG_TCPIP_EMAC_MODULE_ID="ETH_ID_0"
CONFIG_TCPIP_EMAC_INTERRUPT_PRIORITY="INT_PRIORITY_LEVEL5"
CONFIG_TCPIP_EMAC_INTERRUPT_SUB_PRIORITY="INT_SUBPRIORITY_LEVEL3"
CONFIG_TCPIP_EMAC_PHY_TYPE="SMSC_LAN8740"
CONFIG_DRV_ETHPHY_INSTANCES_NUMBER=1
CONFIG_DRV_ETHPHY_CLIENTS_NUMBER=1
CONFIG_DRV_ETHPHY_INDEX=1
CONFIG_DRV_ETHPHY_PERIPHERAL_ID=1
CONFIG_DRV_ETHPHY_NEG_INIT_TMO=1
CONFIG_DRV_ETHPHY_NEG_DONE_TMO=2000
CONFIG_DRV_ETHPHY_RESET_CLR_TMO=500
CONFIG_DRV_ETHMAC_INSTANCES_NUMBER=1
CONFIG_DRV_ETHMAC_CLIENTS_NUMBER=1
CONFIG_DRV_ETHMAC_INDEX=1
CONFIG_DRV_ETHMAC_PERIPHERAL_ID=1
CONFIG_DRV_ETHMAC_INTERRUPT_MODE=y
CONFIG_DRV_ETHMAC_POWER_STATE="SYS_MODULE_POWER_RUN_FULL"
#
# from $HARMONY_VERSION_PATH/framework/driver/flash/config/drv_flash.hconfig
#
CONFIG_USE_DRV_FLASH=n
#
# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/glcd/config/drv_gfx_glcd.hconfig
#
CONFIG_USE_DRV_GFX_GLCD=n
#
# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/lcc/config/drv_gfx_lcc.hconfig
#
CONFIG_USE_DRV_GFX_LCC=n
#
# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/otm2201a/config/drv_gfx_otm2201a.hconfig
#
CONFIG_USE_DRV_GFX_OTM2201A=n
#
# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/ssd1926/config/drv_gfx_ssd1926.hconfig
#
CONFIG_USE_DRV_GFX_SSD1926=n
#
# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/ssd1289/config/drv_gfx_ssd1289.hconfig
#
CONFIG_USE_DRV_GFX_SSD1289=n
#
# from $HARMONY_VERSION_PATH/framework/driver/gfx/controller/s1d13517/config/drv_gfx_s1d13517.hconfig
#
CONFIG_USE_DRV_GFX_S1D13517=n
#
# from $HARMONY_VERSION_PATH/framework/driver/gfx/display/config/drv_gfx_display.hconfig
#
CONFIG_USE_DRV_GFX_DISPLAY=n
#
# from $HARMONY_VERSION_PATH/framework/driver/i2c/config/drv_i2c.hconfig
#
CONFIG_USE_DRV_I2C=n
#
# from $HARMONY_VERSION_PATH/framework/driver/ic/config/drv_ic.hconfig
#
CONFIG_USE_DRV_IC=n
#
# from $HARMONY_VERSION_PATH/framework/driver/nvm/config/drv_nvm.hconfig
#
CONFIG_USE_DRV_NVM=n
#
# from $HARMONY_VERSION_PATH/framework/driver/oc/config/drv_oc.hconfig
#
CONFIG_USE_DRV_OC=n
#
# from $HARMONY_VERSION_PATH/framework/driver/pmp/config/drv_pmp.hconfig
#
CONFIG_USE_DRV_PMP=n
#
# from $HARMONY_VERSION_PATH/framework/driver/rtcc/config/drv_rtcc.hconfig
#
CONFIG_USE_DRV_RTCC=n
#
# from $HARMONY_VERSION_PATH/framework/driver/sample/config/drv_sample.hconfig
#
CONFIG_USE_DRV_SAMPLE=n
#
# from $HARMONY_VERSION_PATH/framework/driver/sdcard/config/drv_sdcard.hconfig
#
CONFIG_USE_DRV_SDCARD=n
#
# from $HARMONY_VERSION_PATH/framework/driver/spi/config/drv_spi.hconfig
#
CONFIG_DRV_SPI_USE_DRIVER=y
CONFIG_DRV_SPI_DRIVER_MODE="DYNAMIC"
CONFIG_DRV_SPI_USE_ISR_MODE=y
CONFIG_DRV_SPI_USE_POLLED_MODE=n
CONFIG_DRV_SPI_USE_MASTER_MODE=y
CONFIG_DRV_SPI_USE_SLAVE_MODE=n
CONFIG_DRV_SPI_USE_STANDARD_BUFFER_MODE=n
CONFIG_DRV_SPI_USE_ENHANCED_BUFFER_MODE=y
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_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_ISR_IDX0=y
CONFIG_DRV_SPI_INT_PRIORITY_IDX0="INT_PRIORITY_LEVEL1"
CONFIG_DRV_SPI_INT_SUB_PRIORITY_IDX0="INT_SUBPRIORITY_LEVEL0"
CONFIG_DRV_SPI_SPI_MODE_MASTER_IDX0=y
CONFIG_DRV_SPI_COMM_WIDTH_8_BIT_IDX0=y
CONFIG_DRV_SPI_BUFFER_ENHANCED_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=13333333
CONFIG_DRV_SPI_CLOCK_MODE_IDX0="DRV_SPI_CLOCK_MODE_IDLE_LOW_EDGE_FALL"
CONFIG_DRV_SPI_INPUT_PHASE_IDX0="SPI_INPUT_SAMPLING_PHASE_AT_END"
CONFIG_DRV_SPI_QUEUE_SIZE_IDX0=10
CONFIG_DRV_SPI_RESERVED_JOB_IDX0=1
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 $HARMONY_VERSION_PATH/framework/driver/spi/config/drv_spi.hconfig
#
CONFIG_DRV_SPI_STATIC_INSTANCES_NUMBER=0
#
# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25/config/drv_sst25.hconfig
#
CONFIG_USE_DRV_SST25=n
#
# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25vf016b/config/drv_sst25vf016b.hconfig
#
CONFIG_USE_DRV_SST25VF016B=n
#
# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25vf020b/config/drv_sst25vf020b.hconfig
#
CONFIG_USE_DRV_SST25VF020B=n
#
# from $HARMONY_VERSION_PATH/framework/driver/spi_flash/sst25vf064c/config/drv_sst25vf064c.hconfig
#
CONFIG_USE_DRV_SST25VF064C=n
#
# from $HARMONY_VERSION_PATH/framework/driver/sram/config/drv_sram.hconfig
#
CONFIG_USE_DRV_SRAM=n
#
# from $HARMONY_VERSION_PATH/framework/driver/tmr/config/drv_tmr.hconfig
#
CONFIG_USE_DRV_TMR=y
CONFIG_DRV_TMR_DRIVER_MODE="DYNAMIC"
CONFIG_DRV_TMR_CLIENTS_NUMBER=1
CONFIG_DRV_TMR_INTERRUPT_MODE=y
CONFIG_DRV_TMR_INSTANCES_NUMBER=1
#
# from $HARMONY_VERSION_PATH/framework/driver/tmr/config/drv_tmr_idx.ftl
#
CONFIG_DRV_TMR_INST_0=y
CONFIG_DRV_TMR_PERIPHERAL_ID_IDX0="TMR_ID_1"
CONFIG_DRV_TMR_INTERRUPT_PRIORITY_IDX0="INT_PRIORITY_LEVEL1"
CONFIG_DRV_TMR_INTERRUPT_SUB_PRIORITY_IDX0="INT_SUBPRIORITY_LEVEL0"
CONFIG_DRV_TMR_CLOCK_SOURCE_2_IDX0="DRV_TMR_CLKSOURCE_INTERNAL"
CONFIG_DRV_TMR_PRESCALE_IDX0="TMR_PRESCALE_VALUE_256"
CONFIG_DRV_TMR_ASYNC_WRITE_ENABLE_IDX0=n
CONFIG_DRV_TMR_POWER_STATE_IDX0="SYS_MODULE_POWER_RUN_FULL"
#
# from $HARMONY_VERSION_PATH/framework/driver/touch/adc10bit/config/drv_adc10bit.hconfig
#
CONFIG_USE_DRV_TOUCH_ADC10BIT=n
#
# from $HARMONY_VERSION_PATH/framework/driver/touch/ar1021/config/drv_ar1021.hconfig
#
CONFIG_USE_DRV_TOUCH_AR1021=n
#
# from $HARMONY_VERSION_PATH/framework/driver/touch/mtch6301/config/drv_mtch6301.hconfig
#
CONFIG_USE_DRV_TOUCH_MTCH6301=n
#
# from $HARMONY_VERSION_PATH/framework/driver/touch/mtch6303/config/drv_mtch6303.hconfig
#
CONFIG_USE_DRV_TOUCH_MTCH6303=n
#
# from $HARMONY_VERSION_PATH/framework/driver/usart/config/drv_usart.hconfig
#
CONFIG_USE_DRV_USART=y
CONFIG_DRV_USART_DRIVER_MODE="DYNAMIC"
CONFIG_DRV_USART_INTERRUPT_MODE=n
CONFIG_DRV_USART_BYTE_MODEL_SUPPORT=n
CONFIG_DRV_USART_READ_WRITE_MODEL_SUPPORT=y
CONFIG_DRV_USART_BUFFER_QUEUE_SUPPORT=y
CONFIG_DRV_USART_SUPPORT_TRANSMIT_DMA=n
CONFIG_DRV_USART_SUPPORT_RECEIVE_DMA=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_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_BRG_CLOCK_IDX0="80000000"
CONFIG_DRV_USART_LINE_CNTRL_IDX0="DRV_USART_LINE_CONTROL_8NONE1"
CONFIG_DRV_USART_HANDSHAKE_MODE_IDX0="DRV_USART_HANDSHAKE_NONE"
CONFIG_DRV_USART_XMIT_QUEUE_SIZE_IDX0=10
CONFIG_DRV_USART_RCV_QUEUE_SIZE_IDX0=10
CONFIG_DRV_USART_POWER_STATE_IDX0="SYS_MODULE_POWER_RUN_FULL"
#
# from $HARMONY_VERSION_PATH/framework/driver/wifi/config/drv_wifi.hconfig
#
CONFIG_USE_DRV_WIFI=n
#
# from $HARMONY_VERSION_PATH/framework/gfx/config/gfx.hconfig
#
CONFIG_USE_GFX_STACK=n
#
# from $HARMONY_VERSION_PATH/framework/gfx/config/gfx_segger.hconfig
#
CONFIG_USE_SEGGER_EMWIN=n
#
# from $HARMONY_VERSION_PATH/framework/math/dsp/config/dsp.hconfig
#
CONFIG_USE_DSP=n
#
# from $HARMONY_VERSION_PATH/framework/math/libq/config/libq.hconfig
#
CONFIG_USE_LIBQ_C=n
#
# from $HARMONY_VERSION_PATH/framework/net/pres/config/net_pres.hconfig
#
CONFIG_NET_PRES_USE=n
#
# from $HARMONY_VERSION_PATH/framework/osal/config/osal.hconfig
#
CONFIG_USE_OSAL=y
#
# from $HARMONY_VERSION_PATH/framework/peripheral/config/peripheral.hconfig
#
CONFIG_PERIPHERAL_LIB=y
#
# from $HARMONY_VERSION_PATH/framework/sample/config/sample_module.hconfig
#
CONFIG_USE_SAMPLE_MODULE=n
#
# from $HARMONY_VERSION_PATH/framework/system/clk/config/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="32768"
CONFIG_SYS_CLK_FREQ="80000000"
CONFIG_SYS_CLK_PBCLK_FREQ="80000000"
CONFIG_SYS_CLK_UPLL_BEFORE_DIV2_FREQ="48000000"
#
# from $HARMONY_VERSION_PATH/framework/system/command/config/sys_command.hconfig
#
CONFIG_USE_SYS_COMMAND=y
CONFIG_COMMAND_PRINT_BUFFER_SIZE=512
CONFIG_REMAP_SYS_DEBUG_MESSAGE=y
CONFIG_REMAP_SYS_CONSOLE_MESSAGE=y
#
# from $HARMONY_VERSION_PATH/framework/system/common/config/sys_common.hconfig
#
CONFIG_USE_SYS_COMMON=y
CONFIG_SYS_BUFFER=n
CONFIG_SYS_QUEUE=n
#
# from $HARMONY_VERSION_PATH/framework/system/console/config/sys_console.hconfig
#
CONFIG_USE_SYS_CONSOLE=y
CONFIG_SYS_CONSOLE_MODE="DYNAMIC"
CONFIG_SYS_CONSOLE_OVERRIDE_STDIO=y
CONFIG_SYS_CONSOLE_INSTANCES_NUMBER_DYNAMIC=1
CONFIG_SYS_CONSOLE_SOURCE_IDX0="UART_CONSOLE"
CONFIG_SYS_CONSOLE_USE_UART_INSTANCE=0
CONFIG_SYS_CONSOLE_UART_RD_QUEUE_DEPTH=1
CONFIG_SYS_CONSOLE_UART_WR_QUEUE_DEPTH=64
#
# from $HARMONY_VERSION_PATH/framework/system/debug/config/sys_debug.hconfig
#
CONFIG_USE_SYS_DEBUG=y
CONFIG_SYS_ERR_LEVEL="SYS_ERROR_FATAL"
CONFIG_DEBUG_PRINT_BUFFER_SIZE=512
#
# from $HARMONY_VERSION_PATH/framework/system/devcon/config/sys_devcon.hconfig
#
CONFIG_USE_SYS_DEVCON=y
CONFIG_SYS_DEVCON_USE_JTAG=n
CONFIG_SYS_DEVCON_USE_TRACE=n
#
# from $HARMONY_VERSION_PATH/framework/system/dma/config/sys_dma.hconfig
#
CONFIG_USE_SYS_DMA=n
#
# from $HARMONY_VERSION_PATH/framework/system/fs/config/sys_fs.hconfig
#
CONFIG_USE_SYS_FS=n
#
# from $HARMONY_VERSION_PATH/framework/system/int/config/sys_int.hconfig
#
CONFIG_USE_SYS_INT=y
CONFIG_USE_EXT_INT=n
#
# from $HARMONY_VERSION_PATH/framework/system/msg/config/sys_msg.hconfig
#
CONFIG_USE_SYS_MSG=n
#
# from $HARMONY_VERSION_PATH/framework/system/ports/config/sys_ports.hconfig
#
CONFIG_USE_SYS_PORTS=y
CONFIG_SYS_PORTS_IMPLEMENTATION="STATIC"
CONFIG_COMPONENT_PACKAGE="TQFP"
CONFIG_SYS_PORTS_CN=n
CONFIG_USE_SYS_PORTS_CN_INTERRUPT=n
CONFIG_SYS_PORT_ADPCFG=0xffff
CONFIG_SYS_PORT_CNEN=0x0
CONFIG_SYS_PORT_CNPU=0x0
#
# from $HARMONY_VERSION_PATH/framework/system/ports/config/sys_ports_idx.ftl
#
CONFIG_USE_PORT_A=y
CONFIG_SYS_PORT_A_TRIS=0xc680
CONFIG_SYS_PORT_A_LAT=0x0
CONFIG_SYS_PORT_A_ODC=0x0
CONFIG_USE_PORT_B=y
CONFIG_SYS_PORT_B_TRIS=0x20
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_SYS_PORT_D_TRIS=0xffff
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 $HARMONY_VERSION_PATH/framework/system/random/config/sys_random.hconfig
#
CONFIG_USE_SYS_RANDOM=y
CONFIG_SYS_RANDOM_CRYPTO_SEED_SIZE=32
CONFIG_SYS_RANDOM_USE_CRYPTO_STRENGTH=n
#
# from $HARMONY_VERSION_PATH/framework/system/reset/config/sys_reset.hconfig
#
CONFIG_USE_SYS_RESET=y
#
# from $HARMONY_VERSION_PATH/framework/system/rtcc/config/sys_rtcc.hconfig
#
CONFIG_USE_SYS_RTCC=n
#
# from $HARMONY_VERSION_PATH/framework/system/touch/config/sys_touch.hconfig
#
CONFIG_USE_SYS_TOUCH=n
#
# from $HARMONY_VERSION_PATH/framework/system/tmr/config/sys_tmr.hconfig
#
CONFIG_USE_SYS_TMR=y
CONFIG_SYS_TMR_POWER_STATE="SYS_MODULE_POWER_RUN_FULL"
CONFIG_SYS_TMR_DRIVER_INDEX="DRV_TMR_INDEX_0"
CONFIG_SYS_TMR_MAX_CLIENT_OBJECTS=5
CONFIG_SYS_TMR_FREQUENCY=1000
CONFIG_SYS_TMR_FREQUENCY_TOLERANCE=10
CONFIG_SYS_TMR_UNIT_RESOLUTION=10000
CONFIG_SYS_TMR_CLIENT_TOLERANCE=10
CONFIG_SYS_TMR_INTERRUPT_NOTIFICATION=n
#
# from $HARMONY_VERSION_PATH/framework/system/wdt/config/sys_wdt.hconfig
#
CONFIG_USE_SYS_WDT=n
#
# from $HARMONY_VERSION_PATH/framework/test/config/test.hconfig
#
CONFIG_USE_TEST_HARNESS=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig
#
CONFIG_USE_TCPIP_STACK=y
CONFIG_TCPIP_STACK_USE_IPV4=y
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/ip.hconfig
#
CONFIG_TCPIP_IPV4_FRAGMENTATION=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig
#
CONFIG_TCPIP_STACK_USE_IPV6=n
CONFIG_TCPIP_USE_TCP=y
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcp.hconfig
#
CONFIG_TCPIP_TCP_MAX_SEG_SIZE_TX=1460
CONFIG_TCPIP_TCP_MAX_SEG_SIZE_RX_LOCAL=1460
CONFIG_TCPIP_TCP_MAX_SEG_SIZE_RX_NON_LOCAL=536
CONFIG_TCPIP_TCP_SOCKET_DEFAULT_TX_SIZE=512
CONFIG_TCPIP_TCP_SOCKET_DEFAULT_RX_SIZE=512
CONFIG_TCPIP_TCP_DYNAMIC_OPTIONS=y
CONFIG_TCPIP_TCP_START_TIMEOUT_VAL=1000
CONFIG_TCPIP_TCP_DELAYED_ACK_TIMEOUT=100
CONFIG_TCPIP_TCP_FIN_WAIT_2_TIMEOUT=5000
CONFIG_TCPIP_TCP_KEEP_ALIVE_TIMEOUT=10000
CONFIG_TCPIP_TCP_CLOSE_WAIT_TIMEOUT=200
CONFIG_TCPIP_TCP_MAX_RETRIES=5
CONFIG_TCPIP_TCP_MAX_UNACKED_KEEP_ALIVES=6
CONFIG_TCPIP_TCP_MAX_SYN_RETRIES=3
CONFIG_TCPIP_TCP_AUTO_TRANSMIT_TIMEOUT_VAL=40
CONFIG_TCPIP_TCP_WINDOW_UPDATE_TIMEOUT_VAL=200
CONFIG_TCPIP_TCP_MAX_SOCKETS=10
CONFIG_TCPIP_TCP_TASK_TICK_RATE=5
CONFIG_TCPIP_TCP_MSL_TIMEOUT=0
CONFIG_TCPIP_TCP_QUIET_TIME=0
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig
#
CONFIG_TCPIP_USE_UDP=y
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/udp.hconfig
#
CONFIG_TCPIP_UDP_MAX_SOCKETS=10
CONFIG_TCPIP_UDP_SOCKET_DEFAULT_TX_SIZE=512
CONFIG_TCPIP_UDP_USE_TX_CHECKSUM=y
CONFIG_TCPIP_UDP_USE_RX_CHECKSUM=y
CONFIG_TCPIP_UDP_SOCKET_DEFAULT_TX_QUEUE_LIMIT=3
CONFIG_TCPIP_UDP_SOCKET_DEFAULT_RX_QUEUE_LIMIT=3
CONFIG_TCPIP_UDP_USE_POOL_BUFFERS=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig
#
CONFIG_TCPIP_STACK_NETWORK_CONFIG_NUMBER=1
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/network_config_idx.ftl
#
CONFIG_TCPIP_STACK_NETWORK_CONFIG_IDX0=y
CONFIG_TCPIP_NETWORK_DEFAULT_INTERFACE_NAME_IDX0="ENCX24J600"
CONFIG_TCPIP_NETWORK_DEFAULT_HOST_NAME_IDX0="MCHPBOARD_E"
CONFIG_TCPIP_NETWORK_DEFAULT_MAC_ADDR_IDX0=""
CONFIG_TCPIP_NETWORK_DEFAULT_IP_ADDRESS_IDX0=""
CONFIG_TCPIP_NETWORK_DEFAULT_IP_MASK_IDX0="255.255.255.0"
CONFIG_TCPIP_NETWORK_DEFAULT_GATEWAY_IDX0=""
CONFIG_TCPIP_NETWORK_DEFAULT_DNS_IDX0=""
CONFIG_TCPIP_NETWORK_DEFAULT_SECOND_DNS_IDX0="0.0.0.0"
CONFIG_TCPIP_NETWORK_DEFAULT_POWER_MODE_IDX0="full"
CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_DHCP_CLIENT_IDX0=y
CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_ZCLL_IDX0=n
CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_DHCP_SERVER_IDX0=n
CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_DNS_CLIENT_IDX0=y
CONFIG_TCPIP_NETWORK_INTERFACE_FLAG_DNS_SERVER_IDX0=n
CONFIG_TCPIP_NETWORK_DEFAULT_MAC_DRIVER_IDX0="DRV_ENCX24J600_MACObject"
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_stack.hconfig
#
CONFIG_TCPIP_STACK_TICK_RATE=5
CONFIG_TCPIP_STACK_USER_NOTIFICATION=n
CONFIG_TCPIP_STACK_DOWN_OPERATION=y
CONFIG_TCPIP_STACK_IF_UP_DOWN_OPERATION=y
CONFIG_TCPIP_STACK_CONFIGURATION_SAVE_RESTORE=y
CONFIG_TCPIP_STACK_SECURE_PORT_ENTRIES=10
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_heap.hconfig
#
CONFIG_TCPIP_USE_HEAP=y
CONFIG_TCPIP_STACK_USE_HEAP_CONFIG="TCPIP_STACK_HEAP_TYPE_INTERNAL_HEAP"
CONFIG_TCPIP_STACK_MALLOC_FUNC="malloc"
CONFIG_TCPIP_STACK_CALLOC_FUNC="calloc"
CONFIG_TCPIP_STACK_FREE_FUNC="free"
CONFIG_TCPIP_STACK_HEAP_USE_FLAGS="TCPIP_STACK_HEAP_FLAG_ALLOC_UNCACHED"
CONFIG_TCPIP_STACK_HEAP_USAGE_CONFIG="TCPIP_STACK_HEAP_USE_DEFAULT"
CONFIG_TCPIP_STACK_SUPPORTED_HEAPS=1
CONFIG_TCPIP_STACK_DRAM_SIZE=39250
CONFIG_TCPIP_STACK_DRAM_RUN_LIMIT=2048
CONFIG_TCPIP_STACK_DRAM_DEBUG_ENABLE=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/arp.hconfig
#
CONFIG_TCPIP_ARP_CACHE_ENTRIES=5
CONFIG_TCPIP_ARP_CACHE_DELETE_OLD=y
CONFIG_TCPIP_ARP_CACHE_SOLVED_ENTRY_TMO=1200
CONFIG_TCPIP_ARP_CACHE_PENDING_ENTRY_TMO=60
CONFIG_TCPIP_ARP_CACHE_PENDING_RETRY_TMO=2
CONFIG_TCPIP_ARP_CACHE_PERMANENT_QUOTA=50
CONFIG_TCPIP_ARP_CACHE_PURGE_THRESHOLD=75
CONFIG_TCPIP_ARP_CACHE_PURGE_QUANTA=1
CONFIG_TCPIP_ARP_CACHE_ENTRY_RETRIES=3
CONFIG_TCPIP_ARP_GRATUITOUS_PROBE_COUNT=1
CONFIG_TCPIP_ARP_TASK_PROCESS_RATE=2
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/berkeley_api.hconfig
#
CONFIG_TCPIP_STACK_USE_BERKELEY_API=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/dhcp.hconfig
#
CONFIG_TCPIP_STACK_USE_DHCP_CLIENT=y
CONFIG_TCPIP_DHCP_TIMEOUT=2
CONFIG_TCPIP_DHCP_TASK_TICK_RATE=5
CONFIG_TCPIP_DHCP_CLIENT_ENABLED=y
CONFIG_TCPIP_DHCP_HOST_NAME_SIZE=20
CONFIG_TCPIP_DHCP_CLIENT_CONNECT_PORT=68
CONFIG_TCPIP_DHCP_SERVER_LISTEN_PORT=67
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/dhcps.hconfig
#
CONFIG_TCPIP_STACK_USE_DHCP_SERVER=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/dns.hconfig
#
CONFIG_TCPIP_USE_DNS_CLIENT=y
CONFIG_TCPIP_DNS_CLIENT_SERVER_TMO=60
CONFIG_TCPIP_DNS_CLIENT_TASK_PROCESS_RATE=200
CONFIG_TCPIP_DNS_CLIENT_CACHE_ENTRIES=5
CONFIG_TCPIP_DNS_CLIENT_CACHE_ENTRY_TMO=0
CONFIG_TCPIP_DNS_CLIENT_CACHE_PER_IPV4_ADDRESS=5
CONFIG_TCPIP_DNS_CLIENT_CACHE_PER_IPV6_ADDRESS=1
CONFIG_TCPIP_DNS_CLIENT_ADDRESS_TYPE="IP_ADDRESS_TYPE_IPV4"
CONFIG_TCPIP_DNS_CLIENT_CACHE_DEFAULT_TTL_VAL=1200
CONFIG_TCPIP_DNS_CLIENT_CACHE_UNSOLVED_ENTRY_TMO=10
CONFIG_TCPIP_DNS_CLIENT_LOOKUP_RETRY_TMO=5
CONFIG_TCPIP_DNS_CLIENT_MAX_HOSTNAME_LEN=32
CONFIG_TCPIP_DNS_CLIENT_MAX_SELECT_INTERFACES=4
CONFIG_TCPIP_DNS_CLIENT_DELETE_OLD_ENTRIES=y
CONFIG_TCPIP_DNS_CLIENT_USER_NOTIFICATION=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/dnss.hconfig
#
CONFIG_TCPIP_USE_DNSS=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/ddns.hconfig
#
CONFIG_TCPIP_USE_DDNS=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/ftp.hconfig
#
CONFIG_TCPIP_USE_FTP_MODULE=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/http.hconfig
#
CONFIG_TCPIP_STACK_USE_HTTP_SERVER=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/http_net.hconfig
#
CONFIG_TCPIP_STACK_USE_HTTP_NET_SERVER=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/icmp.hconfig
#
CONFIG_TCPIP_STACK_USE_ICMPV4=y
CONFIG_TCPIP_STACK_USE_ICMP_SERVER=y
CONFIG_TCPIP_STACK_USE_ICMP_CLIENT=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/nbns.hconfig
#
CONFIG_TCPIP_USE_NBNS=y
CONFIG_TCPIP_NBNS_TASK_TICK_RATE=110
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_reboot.hconfig
#
CONFIG_TCPIP_USE_REBOOT_SERVER=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/smtp.hconfig
#
CONFIG_TCPIP_USE_SMTP_CLIENT=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/smtpc.hconfig
#
CONFIG_TCPIP_USE_SMTPC_CLIENT=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/snmp.hconfig
#
CONFIG_TCPIP_USE_SNMP=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/sntp.hconfig
#
CONFIG_TCPIP_USE_SNTP_CLIENT=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/telnet.hconfig
#
CONFIG_TCPIP_USE_TELNET=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/zeroconf.hconfig
#
CONFIG_TCPIP_USE_LINK_ZERO_CONFIG=y
CONFIG_TCPIP_ZC_WARN_ZCLL=n
CONFIG_TCPIP_ZC_INFO_ZCLL=n
CONFIG_TCPIP_ZC_DEBUG_ZCLL=n
CONFIG_TCPIP_ZC_LL_PROBE_WAIT=1
CONFIG_TCPIP_ZC_LL_PROBE_MIN=1
CONFIG_TCPIP_ZC_LL_PROBE_MAX=2
CONFIG_TCPIP_ZC_LL_PROBE_NUM=3
CONFIG_TCPIP_ZC_LL_ANNOUNCE_WAIT=2
CONFIG_TCPIP_ZC_LL_ANNOUNCE_NUM=2
CONFIG_TCPIP_ZC_LL_ANNOUNCE_INTERVAL=2
CONFIG_TCPIP_ZC_LL_MAX_CONFLICTS=10
CONFIG_TCPIP_ZC_LL_RATE_LIMIT_INTERVAL=60
CONFIG_TCPIP_ZC_LL_DEFEND_INTERVAL=10
CONFIG_TCPIP_ZC_LL_IPV4_LLBASE=0xa9fe0100
CONFIG_TCPIP_ZC_LL_IPV4_LLBASE_MASK=0x0000FFFF
CONFIG_TCPIP_ZC_LL_TASK_TICK_RATE=333
CONFIG_TCPIP_USE_MULTI_CAST_DNS_ZERO_CONFIG=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_announce.hconfig
#
CONFIG_TCPIP_USE_ANNOUNCE=y
CONFIG_TCPIP_ANNOUNCE_MAX_PAYLOAD=512
CONFIG_TCPIP_ANNOUNCE_TASK_RATE=333
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/iperf.hconfig
#
CONFIG_TCPIP_USE_IPERF=n
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tcpip_cmd.hconfig
#
CONFIG_TCPIP_STACK_USE_COMMANDS=y
CONFIG_TCPIP_STACK_COMMANDS_STORAGE_ENABLE=n
CONFIG_TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUESTS=4
CONFIG_TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUEST_DELAY=1000
CONFIG_TCPIP_STACK_COMMANDS_ICMP_ECHO_TIMEOUT=5000
CONFIG_TCPIP_STACK_COMMANDS_WIFI_ENABLE=n
CONFIG_TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUEST_BUFF_SIZE=2000
CONFIG_TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUEST_DATA_SIZE=100
#
# from $HARMONY_VERSION_PATH/framework/tcpip/config/tftpc.hconfig
#
CONFIG_TCPIP_USE_TFTPC_MODULE=n
#
# from $HARMONY_VERSION_PATH/framework/usb/config/usb.hconfig
#
CONFIG_USE_USB_STACK=n
#
# from $HARMONY_VERSION_PATH/bsp/config/bsp.hconfig
#
CONFIG_USE_BSP=y
#
# from $HARMONY_VERSION_PATH/bsp/config/DS60001156.hconfig
#
CONFIG_BSP_PIC32MX_ETH_SK=n
CONFIG_BSP_PIC32MX_ETH_SK2=n
CONFIG_BSP_PIC32MX_PCAP_DB=n
CONFIG_BSP_PIC32MX_USB_SK2=n
CONFIG_BSP_PIC32MX_USB_SK2_LCC_PICTAIL_QVGA=n
CONFIG_BSP_PIC32MX_USB_SK2_LCC_PICTAIL_WQVGA=n
CONFIG_BSP_PIC32MX_USB_SK2_MEB=n
CONFIG_BSP_PIC32MX_USB_SK2_S1D_PICTAIL_VGA=n
CONFIG_BSP_PIC32MX_USB_SK2_S1D_PICTAIL_WQVGA=n
CONFIG_BSP_PIC32MX_USB_SK2_S1D_PICTAIL_WVGA=n
CONFIG_BSP_PIC32MX_USB_SK2_SSD_PICTAIL_QVGA=n
CONFIG_BSP_PIC32MX795_PIM_E16=y
CONFIG_BSP_CHIPKIT_WF32=n
CONFIG_BSP_WIFI_G_DB=n
#
# from $HARMONY_VERSION_PATH/third_party/rtos/config/rtos.hconfig
#
CONFIG_USE_3RDPARTY_RTOS=n
#
# from $HARMONY_VERSION_PATH/third_party/tcpip/config/wolfssl.hconfig
#
CONFIG_USE_3RDPARTY_WOLFSSL=n
#
# from $HARMONY_VERSION_PATH/third_party/tcpip/iniche/config/embtcp.hconfig
#
CONFIG_IN_EMB_TCPIP_USE_TCP=n
#
# from $HARMONY_VERSION_PATH/third_party/tcpip/iniche/config/embdual.hconfig
#
CONFIG_IN_EMB_DUAL_USE_TCP=n
#
# from $HARMONY_VERSION_PATH/third_party/tcpip/iniche/config/stack.hconfig
#
CONFIG_IN_TCPIP=n
#
# from $HARMONY_VERSION_PATH/third_party/gfx/config/gfxtp.hconfig
#
CONFIG_3RDPARTY_SEGGER_EMWIN_LIBRARY=n
#
# from $HARMONY_VERSION_PATH/config/harmony.hconfig
#
CONFIG_DEVICE_CONFIGURATION=y
#
# from $HARMONY_VERSION_PATH/utilities/mhc/config/PIC32MX795F512L.hconfig
#
CONFIG_USERID=0xffff
CONFIG_FSRSSEL="PRIORITY_7"
CONFIG_FMIIEN="OFF"
CONFIG_FETHIO="OFF"
CONFIG_FCANIO="OFF"
CONFIG_FUSBIDIO="OFF"
CONFIG_FVBUSONIO="OFF"
CONFIG_FPLLIDIV="DIV_2"
CONFIG_FPLLMUL="MUL_20"
CONFIG_UPLLIDIV="DIV_2"
CONFIG_UPLLEN="ON"
CONFIG_FPLLODIV="DIV_1"
CONFIG_FNOSC="PRIPLL"
CONFIG_FSOSCEN="ON"
CONFIG_IESO="ON"
CONFIG_POSCMOD="XT"
CONFIG_OSCIOFNC="OFF"
CONFIG_FPBDIV="DIV_1"
CONFIG_FCKSM="CSECME"
CONFIG_WDTPS="PS1048576"
CONFIG_FWDTEN="OFF"
CONFIG_DEBUG="ON"
CONFIG_ICESEL="ICS_PGx2"
CONFIG_PWP="OFF"
CONFIG_BWP="OFF"
CONFIG_CP="OFF"
#
# from $HARMONY_VERSION_PATH/config/harmony.hconfig
#
CONFIG_PROJECT_STANDALONE=n
#
# from $HARMONY_VERSION_PATH/utilities/mhc/config/project.hconfig
#
CONFIG_XC32_HEAP="44960"
#
# from $HARMONY_VERSION_PATH/utilities/mhc/config/isa.hconfig
#
CONFIG_ISA_MIPS32_MODE=y
CONFIG_ISA_MIPS16_MODE=n
@@ -0,0 +1,547 @@
/* 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.09
*******************************************************************************/
// 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.
*/
#include "bsp_config.h"
// 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.09"
#define SYS_VERSION 10900
// *****************************************************************************
/* 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 32768ul
/*** 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 0x0
#define SYS_PORT_A_TRIS 0xc680
#define SYS_PORT_A_LAT 0x0
#define SYS_PORT_A_ODC 0x0
#define SYS_PORT_B_TRIS 0x20
#define SYS_PORT_B_LAT 0x0
#define SYS_PORT_B_ODC 0x0
/*** Timer System Service Configuration ***/
#define SYS_TMR_POWER_STATE SYS_MODULE_POWER_RUN_FULL
#define SYS_TMR_DRIVER_INDEX DRV_TMR_INDEX_0
#define SYS_TMR_MAX_CLIENT_OBJECTS 5
#define SYS_TMR_FREQUENCY 1000
#define SYS_TMR_FREQUENCY_TOLERANCE 10
#define SYS_TMR_UNIT_RESOLUTION 10000
#define SYS_TMR_CLIENT_TOLERANCE 10
#define SYS_TMR_INTERRUPT_NOTIFICATION false
/*** Console System Service Configuration ***/
#define SYS_CONSOLE_OVERRIDE_STDIO
#define SYS_CONSOLE_DEVICE_MAX_INSTANCES 2
#define SYS_CONSOLE_INSTANCES_NUMBER 1
#define SYS_CONSOLE_UART_IDX DRV_USART_INDEX_0
#define SYS_CONSOLE_UART_RD_QUEUE_DEPTH 1
#define SYS_CONSOLE_UART_WR_QUEUE_DEPTH 64
#define SYS_CONSOLE_BUFFER_DMA_READY
/*** Debug System Service Configuration ***/
#define SYS_DEBUG_ENABLE
#define DEBUG_PRINT_BUFFER_SIZE 512
#define SYS_DEBUG_BUFFER_DMA_READY
#define SYS_DEBUG_USE_CONSOLE
/*** Command Processor System Service Configuration ***/
#define SYS_CMD_ENABLE
#define SYS_CMD_DEVICE_MAX_INSTANCES SYS_CONSOLE_DEVICE_MAX_INSTANCES
#define SYS_CMD_PRINT_BUFFER_SIZE 512
#define SYS_CMD_BUFFER_DMA_READY
#define SYS_CMD_REMAP_SYS_CONSOLE_MESSAGE
#define SYS_CMD_REMAP_SYS_DEBUG_MESSAGE
// *****************************************************************************
/* Random System Service Configuration Options
*/
#define SYS_RANDOM_CRYPTO_SEED_SIZE 32
// *****************************************************************************
// *****************************************************************************
// Section: Driver Configuration
// *****************************************************************************
// *****************************************************************************
/*** ENCX24J600 Driver Configuration ***/
/*** Driver Compilation and static configuration options. ***/
#define TCPIP_IF_ENCX24J600
#define DRV_ENCX24J600_INSTANCES_NUMBER 1
#define DRV_ENCX24J600_CLIENT_INSTANCES 1
#define DRV_ENCX24J600_MAC_TX_DESCRIPTORS_IDX0 3
#define DRV_ENCX24J600_MAC_RX_DESCRIPTORS_IDX0 3
#define DRV_ENCX24J600_MAX_RX_BUFFER_IDX0 1536
#define DRV_ENCX24J600_SPI_DRIVER_INDEX_IDX0 0
#define DRV_ENCX24J600_SPI_BPS_IDX0 14000000
#define DRV_ENCX24J600_SPI_SS_PORT_MODULE_IDX0 PORTS_ID_0
#define DRV_ENCX24J600_SPI_SS_PORT_CHANNEL_IDX0 PORT_CHANNEL_D
#define DRV_ENCX24J600_SPI_SS_PORT_PIN_IDX0 PORTS_BIT_POS_14
#define DRV_ENCX24J600_RX_BUFFER_SIZE_IDX0 16384
#define DRV_ENCX24J600_MAX_FRAME_SIZE_IDX0 1536
/*** Timer Driver Configuration ***/
#define DRV_TMR_INTERRUPT_MODE true
#define DRV_TMR_INSTANCES_NUMBER 1
#define DRV_TMR_CLIENTS_NUMBER 1
/*** Timer Driver 0 Configuration ***/
#define DRV_TMR_PERIPHERAL_ID_IDX0 TMR_ID_1
#define DRV_TMR_INTERRUPT_SOURCE_IDX0 INT_SOURCE_TIMER_1
#define DRV_TMR_INTERRUPT_VECTOR_IDX0 INT_VECTOR_T1
#define DRV_TMR_ISR_VECTOR_IDX0 _TIMER_1_VECTOR
#define DRV_TMR_INTERRUPT_PRIORITY_IDX0 INT_PRIORITY_LEVEL1
#define DRV_TMR_INTERRUPT_SUB_PRIORITY_IDX0 INT_SUBPRIORITY_LEVEL0
#define DRV_TMR_CLOCK_SOURCE_IDX0 DRV_TMR_CLKSOURCE_INTERNAL
#define DRV_TMR_PRESCALE_IDX0 TMR_PRESCALE_VALUE_256
#define DRV_TMR_OPERATION_MODE_IDX0 DRV_TMR_OPERATION_MODE_16_BIT
#define DRV_TMR_ASYNC_WRITE_ENABLE_IDX0 false
#define DRV_TMR_POWER_STATE_IDX0 SYS_MODULE_POWER_RUN_FULL
// *****************************************************************************
/* USART Driver Configuration Options
*/
#define DRV_USART_INTERRUPT_MODE false
#define DRV_USART_BYTE_MODEL_SUPPORT false
#define DRV_USART_READ_WRITE_MODEL_SUPPORT true
#define DRV_USART_BUFFER_QUEUE_SUPPORT true
#define DRV_USART_CLIENTS_NUMBER 1
#define DRV_USART_SUPPORT_TRANSMIT_DMA false
#define DRV_USART_SUPPORT_RECEIVE_DMA false
#define DRV_USART_INSTANCES_NUMBER 1
#define DRV_USART_PERIPHERAL_ID_IDX0 USART_ID_2
#define DRV_USART_OPER_MODE_IDX0 DRV_USART_OPERATION_MODE_NORMAL
#define DRV_USART_OPER_MODE_DATA_IDX0
#define DRV_USART_INIT_FLAG_WAKE_ON_START_IDX0 false
#define DRV_USART_INIT_FLAG_AUTO_BAUD_IDX0 false
#define DRV_USART_INIT_FLAG_STOP_IN_IDLE_IDX0 false
#define DRV_USART_INIT_FLAGS_IDX0 0
#define DRV_USART_BRG_CLOCK_IDX0 80000000
#define DRV_USART_BAUD_RATE_IDX0 115200
#define DRV_USART_LINE_CNTRL_IDX0 DRV_USART_LINE_CONTROL_8NONE1
#define DRV_USART_HANDSHAKE_MODE_IDX0 DRV_USART_HANDSHAKE_NONE
#define DRV_USART_XMIT_INT_SRC_IDX0 INT_SOURCE_USART_2_TRANSMIT
#define DRV_USART_RCV_INT_SRC_IDX0 INT_SOURCE_USART_2_RECEIVE
#define DRV_USART_ERR_INT_SRC_IDX0 INT_SOURCE_USART_2_ERROR
#define DRV_USART_XMIT_QUEUE_SIZE_IDX0 10
#define DRV_USART_RCV_QUEUE_SIZE_IDX0 10
#define DRV_USART_POWER_STATE_IDX0 SYS_MODULE_POWER_RUN_FULL
#define DRV_USART_QUEUE_DEPTH_COMBINED 20
/*** SPI Driver Configuration ***/
#define DRV_SPI_NUMBER_OF_MODULES 4
/*** Driver Compilation and static configuration options. ***/
/*** Select SPI compilation units.***/
#define DRV_SPI_POLLED 0
#define DRV_SPI_ISR 1
#define DRV_SPI_MASTER 1
#define DRV_SPI_SLAVE 0
#define DRV_SPI_RM 0
#define DRV_SPI_EBM 1
#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
/* SPI Driver Instance 0 Configuration */
#define DRV_SPI_SPI_ID_IDX0 SPI_ID_1
#define DRV_SPI_TASK_MODE_IDX0 DRV_SPI_TASK_MODE_ISR
#define DRV_SPI_SPI_MODE_IDX0 DRV_SPI_MODE_MASTER
#define DRV_SPI_ALLOW_IDLE_RUN_IDX0 false
#define DRV_SPI_SPI_PROTOCOL_TYPE_IDX0 DRV_SPI_PROTOCOL_TYPE_STANDARD
#define DRV_SPI_COMM_WIDTH_IDX0 SPI_COMMUNICATION_WIDTH_8BITS
#define DRV_SPI_SPI_CLOCK_IDX0 CLK_BUS_PERIPHERAL_2
#define DRV_SPI_BAUD_RATE_IDX0 13333333
#define DRV_SPI_BUFFER_TYPE_IDX0 DRV_SPI_BUFFER_TYPE_ENHANCED
#define DRV_SPI_CLOCK_MODE_IDX0 DRV_SPI_CLOCK_MODE_IDLE_LOW_EDGE_FALL
#define DRV_SPI_INPUT_PHASE_IDX0 SPI_INPUT_SAMPLING_PHASE_AT_END
#define DRV_SPI_TX_INT_SOURCE_IDX0 INT_SOURCE_SPI_1_TRANSMIT
#define DRV_SPI_RX_INT_SOURCE_IDX0 INT_SOURCE_SPI_1_RECEIVE
#define DRV_SPI_ERROR_INT_SOURCE_IDX0 INT_SOURCE_SPI_1_ERROR
#define DRV_SPI_INT_VECTOR_IDX0 INT_VECTOR_SPI1
#define DRV_SPI_INT_PRIORITY_IDX0 INT_PRIORITY_LEVEL1
#define DRV_SPI_INT_SUB_PRIORITY_IDX0 INT_SUBPRIORITY_LEVEL0
#define DRV_SPI_QUEUE_SIZE_IDX0 10
#define DRV_SPI_RESERVED_JOB_IDX0 1
/*** ENCX24J600 Driver Configuration ***/
/*** Driver Compilation and static configuration options. ***/
#define TCPIP_IF_ENCX24J600
#define DRV_ENCX24J600_INSTANCES_NUMBER 1
#define DRV_ENCX24J600_CLIENT_INSTANCES 1
#define DRV_ENCX24J600_MAC_TX_DESCRIPTORS_IDX0 3
#define DRV_ENCX24J600_MAC_RX_DESCRIPTORS_IDX0 3
#define DRV_ENCX24J600_MAX_RX_BUFFER_IDX0 1536
#define DRV_ENCX24J600_SPI_DRIVER_INDEX_IDX0 0
#define DRV_ENCX24J600_SPI_BPS_IDX0 14000000
#define DRV_ENCX24J600_SPI_SS_PORT_MODULE_IDX0 PORTS_ID_0
#define DRV_ENCX24J600_SPI_SS_PORT_CHANNEL_IDX0 PORT_CHANNEL_D
#define DRV_ENCX24J600_SPI_SS_PORT_PIN_IDX0 PORTS_BIT_POS_14
#define DRV_ENCX24J600_RX_BUFFER_SIZE_IDX0 16384
#define DRV_ENCX24J600_MAX_FRAME_SIZE_IDX0 1536
// *****************************************************************************
// *****************************************************************************
// Section: Middleware & Other Library Configuration
// *****************************************************************************
// *****************************************************************************
// *****************************************************************************
// *****************************************************************************
// Section: TCPIP Stack Configuration
// *****************************************************************************
// *****************************************************************************
#define TCPIP_STACK_USE_IPV4
#define TCPIP_STACK_USE_TCP
#define TCPIP_STACK_USE_UDP
#define TCPIP_STACK_TICK_RATE 5
#define TCPIP_STACK_SECURE_PORT_ENTRIES 10
/* TCP/IP stack event notification */
#define TCPIP_STACK_USE_EVENT_NOTIFICATION
#define TCPIP_STACK_USER_NOTIFICATION false
#define TCPIP_STACK_DOWN_OPERATION true
#define TCPIP_STACK_IF_UP_DOWN_OPERATION true
#define TCPIP_STACK_MAC_DOWN_OPERATION true
#define TCPIP_STACK_CONFIGURATION_SAVE_RESTORE true
/*** TCPIP Heap Configuration ***/
#define TCPIP_STACK_USE_INTERNAL_HEAP
#define TCPIP_STACK_DRAM_SIZE 39250
#define TCPIP_STACK_DRAM_RUN_LIMIT 2048
#define TCPIP_STACK_MALLOC_FUNC malloc
#define TCPIP_STACK_CALLOC_FUNC calloc
#define TCPIP_STACK_FREE_FUNC free
#define TCPIP_STACK_HEAP_USE_FLAGS TCPIP_STACK_HEAP_FLAG_ALLOC_UNCACHED
#define TCPIP_STACK_HEAP_USAGE_CONFIG TCPIP_STACK_HEAP_USE_DEFAULT
#define TCPIP_STACK_SUPPORTED_HEAPS 1
/*** ARP Configuration ***/
#define TCPIP_ARP_CACHE_ENTRIES 5
#define TCPIP_ARP_CACHE_DELETE_OLD true
#define TCPIP_ARP_CACHE_SOLVED_ENTRY_TMO 1200
#define TCPIP_ARP_CACHE_PENDING_ENTRY_TMO 60
#define TCPIP_ARP_CACHE_PENDING_RETRY_TMO 2
#define TCPIP_ARP_CACHE_PERMANENT_QUOTA 50
#define TCPIP_ARP_CACHE_PURGE_THRESHOLD 75
#define TCPIP_ARP_CACHE_PURGE_QUANTA 1
#define TCPIP_ARP_CACHE_ENTRY_RETRIES 3
#define TCPIP_ARP_GRATUITOUS_PROBE_COUNT 1
#define TCPIP_ARP_TASK_PROCESS_RATE 2
/*** DHCP Configuration ***/
#define TCPIP_STACK_USE_DHCP_CLIENT
#define TCPIP_DHCP_TIMEOUT 2
#define TCPIP_DHCP_TASK_TICK_RATE 5
#define TCPIP_DHCP_HOST_NAME_SIZE 20
#define TCPIP_DHCP_CLIENT_CONNECT_PORT 68
#define TCPIP_DHCP_SERVER_LISTEN_PORT 67
#define TCPIP_DHCP_CLIENT_ENABLED true
/*** DNS Client Configuration ***/
#define TCPIP_STACK_USE_DNS
#define TCPIP_DNS_CLIENT_SERVER_TMO 60
#define TCPIP_DNS_CLIENT_TASK_PROCESS_RATE 200
#define TCPIP_DNS_CLIENT_CACHE_ENTRIES 5
#define TCPIP_DNS_CLIENT_CACHE_ENTRY_TMO 0
#define TCPIP_DNS_CLIENT_CACHE_PER_IPV4_ADDRESS 5
#define TCPIP_DNS_CLIENT_CACHE_PER_IPV6_ADDRESS 1
#define TCPIP_DNS_CLIENT_ADDRESS_TYPE IP_ADDRESS_TYPE_IPV4
#define TCPIP_DNS_CLIENT_CACHE_DEFAULT_TTL_VAL 1200
#define TCPIP_DNS_CLIENT_CACHE_UNSOLVED_ENTRY_TMO 10
#define TCPIP_DNS_CLIENT_LOOKUP_RETRY_TMO 5
#define TCPIP_DNS_CLIENT_MAX_HOSTNAME_LEN 32
#define TCPIP_DNS_CLIENT_MAX_SELECT_INTERFACES 4
#define TCPIP_DNS_CLIENT_DELETE_OLD_ENTRIES true
#define TCPIP_DNS_CLIENT_USER_NOTIFICATION false
/*** ICMPv4 Server Configuration ***/
#define TCPIP_STACK_USE_ICMP_SERVER
/*** NBNS Configuration ***/
#define TCPIP_STACK_USE_NBNS
#define TCPIP_NBNS_TASK_TICK_RATE 110
/*** TCP Configuration ***/
#define TCPIP_TCP_MAX_SEG_SIZE_TX 1460
#define TCPIP_TCP_MAX_SEG_SIZE_RX_LOCAL 1460
#define TCPIP_TCP_MAX_SEG_SIZE_RX_NON_LOCAL 536
#define TCPIP_TCP_SOCKET_DEFAULT_TX_SIZE 512
#define TCPIP_TCP_SOCKET_DEFAULT_RX_SIZE 512
#define TCPIP_TCP_DYNAMIC_OPTIONS true
#define TCPIP_TCP_START_TIMEOUT_VAL 1000
#define TCPIP_TCP_DELAYED_ACK_TIMEOUT 100
#define TCPIP_TCP_FIN_WAIT_2_TIMEOUT 5000
#define TCPIP_TCP_KEEP_ALIVE_TIMEOUT 10000
#define TCPIP_TCP_CLOSE_WAIT_TIMEOUT 200
#define TCPIP_TCP_MAX_RETRIES 5
#define TCPIP_TCP_MAX_UNACKED_KEEP_ALIVES 6
#define TCPIP_TCP_MAX_SYN_RETRIES 3
#define TCPIP_TCP_AUTO_TRANSMIT_TIMEOUT_VAL 40
#define TCPIP_TCP_WINDOW_UPDATE_TIMEOUT_VAL 200
#define TCPIP_TCP_MAX_SOCKETS 10
#define TCPIP_TCP_TASK_TICK_RATE 5
#define TCPIP_TCP_MSL_TIMEOUT 0
#define TCPIP_TCP_QUIET_TIME 0
/*** announce Configuration ***/
#define TCPIP_STACK_USE_ANNOUNCE
#define TCPIP_ANNOUNCE_MAX_PAYLOAD 512
#define TCPIP_ANNOUNCE_TASK_RATE 333
/*** TCPIP MAC Configuration ***/
#define TCPIP_EMAC_TX_DESCRIPTORS 8
#define TCPIP_EMAC_RX_DESCRIPTORS 6
#define TCPIP_EMAC_RX_DEDICATED_BUFFERS 4
#define TCPIP_EMAC_RX_INIT_BUFFERS 0
#define TCPIP_EMAC_RX_LOW_THRESHOLD 1
#define TCPIP_EMAC_RX_LOW_FILL 2
#define TCPIP_EMAC_RX_BUFF_SIZE 1536
#define TCPIP_EMAC_RX_MAX_FRAME 1536
#define TCPIP_EMAC_RX_FILTERS \
TCPIP_MAC_RX_FILTER_TYPE_BCAST_ACCEPT |\
TCPIP_MAC_RX_FILTER_TYPE_MCAST_ACCEPT |\
TCPIP_MAC_RX_FILTER_TYPE_UCAST_ACCEPT |\
TCPIP_MAC_RX_FILTER_TYPE_RUNT_REJECT |\
TCPIP_MAC_RX_FILTER_TYPE_CRC_ERROR_REJECT |\
0
#define TCPIP_EMAC_RX_FRAGMENTS 1
#define TCPIP_EMAC_ETH_OPEN_FLAGS \
TCPIP_ETH_OPEN_AUTO |\
TCPIP_ETH_OPEN_FDUPLEX |\
TCPIP_ETH_OPEN_HDUPLEX |\
TCPIP_ETH_OPEN_100 |\
TCPIP_ETH_OPEN_10 |\
TCPIP_ETH_OPEN_MDIX_AUTO |\
0
#define TCPIP_EMAC_PHY_CONFIG_FLAGS \
DRV_ETHPHY_CFG_AUTO | \
0
#define TCPIP_EMAC_PHY_LINK_INIT_DELAY 500
#define TCPIP_EMAC_PHY_ADDRESS 0
#define TCPIP_EMAC_MODULE_ID ETH_ID_0
#define TCPIP_EMAC_INTERRUPT_MODE true
#define DRV_ETHPHY_INSTANCES_NUMBER 1
#define DRV_ETHPHY_CLIENTS_NUMBER 1
#define DRV_ETHPHY_INDEX 1
#define DRV_ETHPHY_PERIPHERAL_ID 1
#define DRV_ETHPHY_NEG_INIT_TMO 1
#define DRV_ETHPHY_NEG_DONE_TMO 2000
#define DRV_ETHPHY_RESET_CLR_TMO 500
#define DRV_ETHMAC_INSTANCES_NUMBER 1
#define DRV_ETHMAC_CLIENTS_NUMBER 1
#define DRV_ETHMAC_INDEX 1
#define DRV_ETHMAC_PERIPHERAL_ID 1
#define DRV_ETHMAC_INTERRUPT_VECTOR INT_VECTOR_ETHERNET
#define DRV_ETHMAC_INTERRUPT_SOURCE INT_SOURCE_ETH_1
#define DRV_ETHMAC_POWER_STATE SYS_MODULE_POWER_RUN_FULL
#define DRV_ETHMAC_INTERRUPT_MODE true
/*** UDP Configuration ***/
#define TCPIP_UDP_MAX_SOCKETS 10
#define TCPIP_UDP_SOCKET_DEFAULT_TX_SIZE 512
#define TCPIP_UDP_SOCKET_DEFAULT_TX_QUEUE_LIMIT 3
#define TCPIP_UDP_SOCKET_DEFAULT_RX_QUEUE_LIMIT 3
#define TCPIP_UDP_USE_POOL_BUFFERS false
#define TCPIP_UDP_USE_TX_CHECKSUM true
#define TCPIP_UDP_USE_RX_CHECKSUM true
#define TCPIP_STACK_USE_ZEROCONF_LINK_LOCAL
#define TCPIP_ZC_LL_PROBE_WAIT 1
#define TCPIP_ZC_LL_PROBE_MIN 1
#define TCPIP_ZC_LL_PROBE_MAX 2
#define TCPIP_ZC_LL_PROBE_NUM 3
#define TCPIP_ZC_LL_ANNOUNCE_WAIT 2
#define TCPIP_ZC_LL_ANNOUNCE_NUM 2
#define TCPIP_ZC_LL_ANNOUNCE_INTERVAL 2
#define TCPIP_ZC_LL_MAX_CONFLICTS 10
#define TCPIP_ZC_LL_RATE_LIMIT_INTERVAL 60
#define TCPIP_ZC_LL_DEFEND_INTERVAL 10
#define TCPIP_ZC_LL_IPV4_LLBASE 0xa9fe0100
#define TCPIP_ZC_LL_IPV4_LLBASE_MASK 0x0000FFFF
#define TCPIP_ZC_LL_TASK_TICK_RATE 333
/*** Network Configuration Index 0 ***/
#define TCPIP_NETWORK_DEFAULT_INTERFACE_NAME "ENCX24J600"
#define TCPIP_NETWORK_DEFAULT_HOST_NAME "MCHPBOARD_E"
#define TCPIP_NETWORK_DEFAULT_MAC_ADDR 0
#define TCPIP_NETWORK_DEFAULT_IP_ADDRESS ""
#define TCPIP_NETWORK_DEFAULT_IP_MASK "255.255.255.0"
#define TCPIP_NETWORK_DEFAULT_GATEWAY ""
#define TCPIP_NETWORK_DEFAULT_DNS ""
#define TCPIP_NETWORK_DEFAULT_SECOND_DNS "0.0.0.0"
#define TCPIP_NETWORK_DEFAULT_POWER_MODE "full"
#define TCPIP_NETWORK_DEFAULT_INTERFACE_FLAGS \
TCPIP_NETWORK_CONFIG_DHCP_CLIENT_ON |\
TCPIP_NETWORK_CONFIG_DNS_CLIENT_ON |\
TCPIP_NETWORK_CONFIG_IP_STATIC
#define TCPIP_NETWORK_DEFAULT_MAC_DRIVER DRV_ENCX24J600_MACObject
#define TCPIP_NETWORK_DEFAULT_IPV6_ADDRESS 0
#define TCPIP_NETWORK_DEFAULT_IPV6_PREFIX_LENGTH 0
#define TCPIP_NETWORK_DEFAULT_IPV6_GATEWAY 0
/*** tcpip_cmd Configuration ***/
#define TCPIP_STACK_COMMAND_ENABLE
#define TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUESTS 4
#define TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUEST_DELAY 1000
#define TCPIP_STACK_COMMANDS_ICMP_ECHO_TIMEOUT 5000
#define TCPIP_STACK_COMMANDS_WIFI_ENABLE false
#define TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUEST_BUFF_SIZE 2000
#define TCPIP_STACK_COMMANDS_ICMP_ECHO_REQUEST_DATA_SIZE 100
/*** IPv4 Configuration ***/
// *****************************************************************************
/* BSP Configuration Options
*/
#define BSP_OSC_FREQUENCY 8000000
// *****************************************************************************
// *****************************************************************************
// Section: Application Configuration
// *****************************************************************************
// *****************************************************************************
/*** Application Instance 0 Configuration ***/
//DOM-IGNORE-BEGIN
#ifdef __cplusplus
}
#endif
//DOM-IGNORE-END
#endif // _SYSTEM_CONFIG_H
/*******************************************************************************
End of File
*/
@@ -0,0 +1,143 @@
/* 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 <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#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 "system/random/sys_random.h"
#include "system/tmr/sys_tmr.h"
#include "system/reset/sys_reset.h"
#include "driver/tmr/drv_tmr.h"
#include "driver/usart/drv_usart.h"
#include "system/ports/sys_ports.h"
#include "driver/spi/drv_spi.h"
#include "driver/encx24j600/drv_encx24j600.h"
#include "system/debug/sys_debug.h"
#include "system/command/sys_command.h"
#include "tcpip/tcpip.h"
#include "driver/ethmac/drv_ethmac.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 sysTmr;
SYS_MODULE_OBJ drvTmr0;
SYS_MODULE_OBJ drvUsart0;
SYS_MODULE_OBJ sysDebug;
SYS_MODULE_OBJ sysConsole0;
/*** SPI Object for Index 0 ***/
SYS_MODULE_OBJ spiObjectIdx0;
SYS_MODULE_OBJ tcpip;
} 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
*/
@@ -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 <xc.h> /* 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
<editor-fold defaultstate="expanded" desc="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"
};
// </editor-fold>
// *****************************************************************************
// *****************************************************************************
// 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
*/
@@ -0,0 +1,540 @@
/* 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
// ****************************************************************************
// ****************************************************************************
// <editor-fold defaultstate="collapsed" desc="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 = PRIPLL
#pragma config FSOSCEN = ON
#pragma config IESO = ON
#pragma config POSCMOD = XT
#pragma config OSCIOFNC = OFF
#pragma config FPBDIV = DIV_1
#pragma config FCKSM = CSECME
#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 = ON
/*** DEVCFG3 ***/
#pragma config USERID = 0xffff
#pragma config FSRSSEL = PRIORITY_7
#pragma config FMIIEN = OFF
#pragma config FETHIO = OFF
#pragma config FCANIO = OFF
#pragma config FUSBIDIO = OFF
#pragma config FVBUSONIO = OFF
// </editor-fold>
// *****************************************************************************
// *****************************************************************************
// Section: Driver Initialization Data
// *****************************************************************************
// *****************************************************************************
// <editor-fold defaultstate="collapsed" desc="ENC 600 Driver Initialization Data">
/* ENC 600 Driver Configuration */
DRV_ENCX24J600_Configuration drvEncX24j600InitDataIdx0 = {
.txDescriptors = DRV_ENCX24J600_MAC_TX_DESCRIPTORS_IDX0,
.rxDescriptors = DRV_ENCX24J600_MAC_RX_DESCRIPTORS_IDX0,
.rxDescBufferSize = DRV_ENCX24J600_MAX_RX_BUFFER_IDX0,
.spiDrvIndex = DRV_ENCX24J600_SPI_DRIVER_INDEX_IDX0,
.spiBps = DRV_ENCX24J600_SPI_BPS_IDX0,
.spiSSPortModule = DRV_ENCX24J600_SPI_SS_PORT_MODULE_IDX0,
.spiSSPortChannel = DRV_ENCX24J600_SPI_SS_PORT_CHANNEL_IDX0,
.spiSSPortPin = DRV_ENCX24J600_SPI_SS_PORT_PIN_IDX0,
.rxBufferSize = DRV_ENCX24J600_RX_BUFFER_SIZE_IDX0,
.maxFrameSize = DRV_ENCX24J600_MAX_FRAME_SIZE_IDX0,
};
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="DRV_SPI Initialization Data">
/*** SPI Driver Initialization Data ***/
/*** Index 0 ***/
DRV_SPI_INIT drvSpi0InitData =
{
.spiId = DRV_SPI_SPI_ID_IDX0,
.taskMode = DRV_SPI_TASK_MODE_IDX0,
.spiMode = DRV_SPI_SPI_MODE_IDX0,
.allowIdleRun = DRV_SPI_ALLOW_IDLE_RUN_IDX0,
.spiProtocolType = DRV_SPI_SPI_PROTOCOL_TYPE_IDX0,
.commWidth = DRV_SPI_COMM_WIDTH_IDX0,
.spiClk = DRV_SPI_SPI_CLOCK_IDX0,
.baudRate = DRV_SPI_BAUD_RATE_IDX0,
.bufferType = DRV_SPI_BUFFER_TYPE_IDX0,
.clockMode = DRV_SPI_CLOCK_MODE_IDX0,
.inputSamplePhase = DRV_SPI_INPUT_PHASE_IDX0,
.txInterruptSource = DRV_SPI_TX_INT_SOURCE_IDX0,
.rxInterruptSource = DRV_SPI_RX_INT_SOURCE_IDX0,
.errInterruptSource = DRV_SPI_ERROR_INT_SOURCE_IDX0,
.queueSize = DRV_SPI_QUEUE_SIZE_IDX0,
.jobQueueReserveSize = DRV_SPI_RESERVED_JOB_IDX0,
};
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="DRV_Timer Initialization Data">
/*** TMR Driver Initialization Data ***/
const DRV_TMR_INIT drvTmr0InitData =
{
.moduleInit.sys.powerState = DRV_TMR_POWER_STATE_IDX0,
.tmrId = DRV_TMR_PERIPHERAL_ID_IDX0,
.clockSource = DRV_TMR_CLOCK_SOURCE_IDX0,
.prescale = DRV_TMR_PRESCALE_IDX0,
.mode = DRV_TMR_OPERATION_MODE_16_BIT,
.interruptSource = DRV_TMR_INTERRUPT_SOURCE_IDX0,
.asyncWriteEnable = false,
};
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="DRV_USART Initialization Data">
const DRV_USART_INIT drvUsart0InitData =
{
.moduleInit.value = DRV_USART_POWER_STATE_IDX0,
.usartID = DRV_USART_PERIPHERAL_ID_IDX0,
.mode = DRV_USART_OPER_MODE_IDX0,
.flags = DRV_USART_INIT_FLAGS_IDX0,
.brgClock = DRV_USART_BRG_CLOCK_IDX0,
.lineControl = DRV_USART_LINE_CNTRL_IDX0,
.baud = DRV_USART_BAUD_RATE_IDX0,
.handshake = DRV_USART_HANDSHAKE_MODE_IDX0,
.interruptTransmit = DRV_USART_XMIT_INT_SRC_IDX0,
.interruptReceive = DRV_USART_RCV_INT_SRC_IDX0,
.interruptError = DRV_USART_ERR_INT_SRC_IDX0,
.queueSizeTransmit = DRV_USART_XMIT_QUEUE_SIZE_IDX0,
.queueSizeReceive = DRV_USART_RCV_QUEUE_SIZE_IDX0,
.dmaChannelTransmit = DMA_CHANNEL_NONE,
.dmaInterruptTransmit = DRV_USART_XMIT_INT_SRC_IDX0,
.dmaChannelReceive = DMA_CHANNEL_NONE,
.dmaInterruptReceive = DRV_USART_RCV_INT_SRC_IDX0,
};
// </editor-fold>
// *****************************************************************************
// *****************************************************************************
// Section: System Data
// *****************************************************************************
// *****************************************************************************
/* Structure to hold the object handles for the modules in the system. */
SYSTEM_OBJECTS sysObj;
// *****************************************************************************
// *****************************************************************************
// Section: Module Initialization Data
// *****************************************************************************
// *****************************************************************************
// <editor-fold defaultstate="collapsed" desc="SYS_COMMAND Initialization Data">
/*** System Command Initialization Data ***/
SYS_CMD_INIT sysCmdInit =
{
.moduleInit = {0},
.consoleCmdIOParam = SYS_CMD_SINGLE_CHARACTER_READ_CONSOLE_IO_PARAM,
};
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="SYS_CONSOLE Initialization Data">
/*** System Console Initialization Data ***/
SYS_MODULE_OBJ sysConsoleObjects[] = { SYS_MODULE_OBJ_INVALID };
/* Declared in console device implementation (sys_console_uart.c) */
extern SYS_CONSOLE_DEV_DESC consUsartDevDesc;
SYS_CONSOLE_INIT consUsartInit0 =
{
.moduleInit = {0},
.consDevDesc = &consUsartDevDesc,
};
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="SYS_DEBUG Initialization Data">
/*** System Debug Initialization Data ***/
SYS_DEBUG_INIT debugInit =
{
.moduleInit = {0},
.errorLevel = SYS_ERROR_FATAL
};
// </editor-fold>
//<editor-fold defaultstate="collapsed" desc="SYS_DEVCON Initialization Data">
/*******************************************************************************
Device Control System Service Initialization Data
*/
const SYS_DEVCON_INIT sysDevconInit =
{
.moduleInit = {0},
};
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="SYS_TMR Initialization Data">
/*** TMR Service Initialization Data ***/
const SYS_TMR_INIT sysTmrInitData =
{
.moduleInit = {SYS_MODULE_POWER_RUN_FULL},
.drvIndex = DRV_TMR_INDEX_0,
.tmrFreq = 1000,
};
// </editor-fold>
// *****************************************************************************
// *****************************************************************************
// Section: Library/Stack Initialization Data
// *****************************************************************************
// *****************************************************************************
// <editor-fold defaultstate="collapsed" desc="TCPIP Stack Initialization Data">
// *****************************************************************************
// *****************************************************************************
// Section: TCPIP Data
// *****************************************************************************
// *****************************************************************************
/*** ARP Service Initialization Data ***/
const TCPIP_ARP_MODULE_CONFIG tcpipARPInitData =
{
.cacheEntries = TCPIP_ARP_CACHE_ENTRIES,
.deleteOld = TCPIP_ARP_CACHE_DELETE_OLD,
.entrySolvedTmo = TCPIP_ARP_CACHE_SOLVED_ENTRY_TMO,
.entryPendingTmo = TCPIP_ARP_CACHE_PENDING_ENTRY_TMO,
.entryRetryTmo = TCPIP_ARP_CACHE_PENDING_RETRY_TMO,
.permQuota = TCPIP_ARP_CACHE_PERMANENT_QUOTA,
.purgeThres = TCPIP_ARP_CACHE_PURGE_THRESHOLD,
.purgeQuanta = TCPIP_ARP_CACHE_PURGE_QUANTA,
.retries = TCPIP_ARP_CACHE_ENTRY_RETRIES,
.gratProbeCount = TCPIP_ARP_GRATUITOUS_PROBE_COUNT,
};
/*** Announce Discovery Initialization Data ***/
const TCPIP_ANNOUNCE_MODULE_CONFIG tcpipAnnounceInitData =
{
};
/*** UDP Sockets Initialization Data ***/
const TCPIP_UDP_MODULE_CONFIG tcpipUDPInitData =
{
.nSockets = TCPIP_UDP_MAX_SOCKETS,
.sktTxBuffSize = TCPIP_UDP_SOCKET_DEFAULT_TX_SIZE,
};
/*** TCP Sockets Initialization Data ***/
const TCPIP_TCP_MODULE_CONFIG tcpipTCPInitData =
{
.nSockets = TCPIP_TCP_MAX_SOCKETS,
.sktTxBuffSize = TCPIP_TCP_SOCKET_DEFAULT_TX_SIZE,
.sktRxBuffSize = TCPIP_TCP_SOCKET_DEFAULT_RX_SIZE,
};
/*** DHCP client Initialization Data ***/
const TCPIP_DHCP_MODULE_CONFIG tcpipDHCPInitData =
{
.dhcpEnable = TCPIP_DHCP_CLIENT_ENABLED,
.dhcpTmo = TCPIP_DHCP_TIMEOUT,
.dhcpCliPort = TCPIP_DHCP_CLIENT_CONNECT_PORT,
.dhcpSrvPort = TCPIP_DHCP_SERVER_LISTEN_PORT,
};
/*** ICMP Server Initialization Data ***/
const TCPIP_ICMP_MODULE_CONFIG tcpipICMPInitData =
{
};
/*** NBNS Server Initialization Data ***/
const TCPIP_NBNS_MODULE_CONFIG tcpipNBNSInitData =
{
};
/*** ETH MAC Initialization Data ***/
const TCPIP_MODULE_MAC_PIC32INT_CONFIG tcpipMACPIC32INTInitData =
{
.nTxDescriptors = TCPIP_EMAC_TX_DESCRIPTORS,
.rxBuffSize = TCPIP_EMAC_RX_BUFF_SIZE,
.nRxDescriptors = TCPIP_EMAC_RX_DESCRIPTORS,
.nRxDedicatedBuffers = TCPIP_EMAC_RX_DEDICATED_BUFFERS,
.nRxInitBuffers = TCPIP_EMAC_RX_INIT_BUFFERS,
.rxLowThreshold = TCPIP_EMAC_RX_LOW_THRESHOLD,
.rxLowFill = TCPIP_EMAC_RX_LOW_FILL,
.ethFlags = TCPIP_EMAC_ETH_OPEN_FLAGS,
.phyFlags = TCPIP_EMAC_PHY_CONFIG_FLAGS,
.linkInitDelay = TCPIP_EMAC_PHY_LINK_INIT_DELAY,
.phyAddress = TCPIP_EMAC_PHY_ADDRESS,
.ethModuleId = TCPIP_EMAC_MODULE_ID,
.pPhyObject = &DRV_ETHPHY_OBJECT_SMSC_LAN8740,
.pPhyBase = &DRV_ETHPHY_OBJECT_BASE_Default,
};
/*** Zeroconfig initialization data ***/
const ZCLL_MODULE_CONFIG tcpipZCLLInitData =
{
};
/*** DNS Client Initialization Data ***/
const TCPIP_DNS_CLIENT_MODULE_CONFIG tcpipDNSClientInitData =
{
.deleteOldLease = TCPIP_DNS_CLIENT_DELETE_OLD_ENTRIES,
.cacheEntries = TCPIP_DNS_CLIENT_CACHE_ENTRIES,
.entrySolvedTmo = TCPIP_DNS_CLIENT_CACHE_ENTRY_TMO,
.nIPv4Entries = TCPIP_DNS_CLIENT_CACHE_PER_IPV4_ADDRESS,
.ipAddressType = TCPIP_DNS_CLIENT_ADDRESS_TYPE,
.nIPv6Entries = TCPIP_DNS_CLIENT_CACHE_PER_IPV6_ADDRESS,
};
TCPIP_STACK_HEAP_INTERNAL_CONFIG tcpipHeapConfig =
{
.heapType = TCPIP_STACK_HEAP_TYPE_INTERNAL_HEAP,
.heapFlags = TCPIP_STACK_HEAP_USE_FLAGS,
.heapUsage = TCPIP_STACK_HEAP_USAGE_CONFIG,
.malloc_fnc = TCPIP_STACK_MALLOC_FUNC,
.calloc_fnc = TCPIP_STACK_CALLOC_FUNC,
.free_fnc = TCPIP_STACK_FREE_FUNC,
.heapSize = TCPIP_STACK_DRAM_SIZE,
};
const TCPIP_NETWORK_CONFIG __attribute__((unused)) TCPIP_HOSTS_CONFIGURATION[] =
{
/*** Network Configuration Index 0 ***/
{
TCPIP_NETWORK_DEFAULT_INTERFACE_NAME, // interface
TCPIP_NETWORK_DEFAULT_HOST_NAME, // hostName
TCPIP_NETWORK_DEFAULT_MAC_ADDR, // macAddr
TCPIP_NETWORK_DEFAULT_IP_ADDRESS, // ipAddr
TCPIP_NETWORK_DEFAULT_IP_MASK, // ipMask
TCPIP_NETWORK_DEFAULT_GATEWAY, // gateway
TCPIP_NETWORK_DEFAULT_DNS, // priDNS
TCPIP_NETWORK_DEFAULT_SECOND_DNS, // secondDNS
TCPIP_NETWORK_DEFAULT_POWER_MODE, // powerMode
TCPIP_NETWORK_DEFAULT_INTERFACE_FLAGS, // startFlags
&TCPIP_NETWORK_DEFAULT_MAC_DRIVER, // pMacObject
},
};
const TCPIP_STACK_MODULE_CONFIG TCPIP_STACK_MODULE_CONFIG_TBL [] =
{
{TCPIP_MODULE_IPV4, 0},
{TCPIP_MODULE_ICMP, 0}, // TCPIP_MODULE_ICMP
{TCPIP_MODULE_ARP, &tcpipARPInitData}, // TCPIP_MODULE_ARP
{TCPIP_MODULE_UDP, &tcpipUDPInitData}, // TCPIP_MODULE_UDP,
{TCPIP_MODULE_TCP, &tcpipTCPInitData}, // TCPIP_MODULE_TCP,
{TCPIP_MODULE_DHCP_CLIENT, &tcpipDHCPInitData}, // TCPIP_MODULE_DHCP_CLIENT,
{TCPIP_MODULE_ANNOUNCE, &tcpipAnnounceInitData}, // TCPIP_MODULE_ANNOUNCE,
{TCPIP_MODULE_DNS_CLIENT,&tcpipDNSClientInitData}, // TCPIP_MODULE_DNS_CLIENT,
{TCPIP_MODULE_NBNS, &tcpipNBNSInitData}, // TCPIP_MODULE_NBNS
{TCPIP_MODULE_ZCLL, 0}, // TCPIP_MODULE_ZCLL,
{ TCPIP_MODULE_MANAGER, & tcpipHeapConfig }, // TCPIP_MODULE_MANAGER
// MAC modules
{TCPIP_MODULE_MAC_ENCJ600, &drvEncX24j600InitDataIdx0}, // TCPIP_MODULE_MAC_ENCJ600
};
/*********************************************************************
* Function: SYS_MODULE_OBJ TCPIP_STACK_Init()
*
* PreCondition: None
*
* Input:
*
* Output: valid system module object if Stack and its componets are initialized
* SYS_MODULE_OBJ_INVALID otherwise
*
* Overview: The function starts the initialization of the stack.
* If an error occurs, the SYS_ERROR() is called
* and the function de-initialize itself and will return false.
*
* Side Effects: None
*
* Note: This function must be called before any of the
* stack or its component routines are used.
*
********************************************************************/
SYS_MODULE_OBJ TCPIP_STACK_Init()
{
TCPIP_STACK_INIT tcpipInit;
tcpipInit.moduleInit.sys.powerState = SYS_MODULE_POWER_RUN_FULL;
tcpipInit.pNetConf = TCPIP_HOSTS_CONFIGURATION;
tcpipInit.nNets = sizeof (TCPIP_HOSTS_CONFIGURATION) / sizeof (*TCPIP_HOSTS_CONFIGURATION);
tcpipInit.pModConfig = TCPIP_STACK_MODULE_CONFIG_TBL;
tcpipInit.nModules = sizeof (TCPIP_STACK_MODULE_CONFIG_TBL) / sizeof (*TCPIP_STACK_MODULE_CONFIG_TBL);
return TCPIP_STACK_Initialize(0, &tcpipInit.moduleInit);
}
// </editor-fold>
// *****************************************************************************
// *****************************************************************************
// 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();
/* Board Support Package Initialization */
BSP_Initialize();
/* Initialize Drivers */
/*** SPI Driver Index 0 initialization***/
SYS_INT_VectorPrioritySet(DRV_SPI_INT_VECTOR_IDX0, DRV_SPI_INT_PRIORITY_IDX0);
SYS_INT_VectorSubprioritySet(DRV_SPI_INT_VECTOR_IDX0, DRV_SPI_INT_SUB_PRIORITY_IDX0);
sysObj.spiObjectIdx0 = DRV_SPI_Initialize(DRV_SPI_INDEX_0, (const SYS_MODULE_INIT * const)&drvSpi0InitData);
sysObj.drvTmr0 = DRV_TMR_Initialize(DRV_TMR_INDEX_0, (SYS_MODULE_INIT *)&drvTmr0InitData);
SYS_INT_VectorPrioritySet(INT_VECTOR_T1, INT_PRIORITY_LEVEL1);
SYS_INT_VectorSubprioritySet(INT_VECTOR_T1, INT_SUBPRIORITY_LEVEL0);
sysObj.drvUsart0 = DRV_USART_Initialize(DRV_USART_INDEX_0, (SYS_MODULE_INIT *)&drvUsart0InitData);
/* Initialize System Services */
/*** Command Service Initialization Code ***/
SYS_CMD_Initialize((SYS_MODULE_INIT*)&sysCmdInit);
sysObj.sysConsole0 = SYS_CONSOLE_Initialize(SYS_CONSOLE_INDEX_0, (SYS_MODULE_INIT *)&consUsartInit0);
/*** Debug Service Initialization Code ***/
sysObj.sysDebug = SYS_DEBUG_Initialize(SYS_DEBUG_INDEX_0, (SYS_MODULE_INIT*)&debugInit);
/*** Interrupt Service Initialization Code ***/
SYS_INT_Initialize();
/*** Random Service Initialization Code ***/
SYS_RANDOM_Initialize(0, 0);
/*** TMR Service Initialization Code ***/
sysObj.sysTmr = SYS_TMR_Initialize(SYS_TMR_INDEX_0, (const SYS_MODULE_INIT * const)&sysTmrInitData);
/* Initialize Middleware */
/* set priority for ETHERNET interrupt source */
SYS_INT_VectorPrioritySet(INT_VECTOR_ETH, INT_PRIORITY_LEVEL5);
/* set sub-priority for ETHERNET interrupt source */
SYS_INT_VectorSubprioritySet(INT_VECTOR_ETH, INT_SUBPRIORITY_LEVEL3);
/* TCPIP Stack Initialization */
sysObj.tcpip = TCPIP_STACK_Init();
SYS_ASSERT(sysObj.tcpip != SYS_MODULE_OBJ_INVALID, "TCPIP_STACK_Init Failed" );
/* Enable Global Interrupts */
SYS_INT_Enable();
/* Initialize the Application */
APP_Initialize();
}
/*******************************************************************************
End of File
*/
@@ -0,0 +1,105 @@
/* 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 <xc.h>
#include <sys/attribs.h>
#include "app.h"
#include "system_definitions.h"
// *****************************************************************************
// *****************************************************************************
// Section: System Interrupt Vector Functions
// *****************************************************************************
// *****************************************************************************
void __ISR(_TIMER_1_VECTOR, ipl1AUTO) IntHandlerDrvTmrInstance0(void)
{
DRV_TMR_Tasks(sysObj.drvTmr0);
}
void __ISR(_SPI_1_VECTOR, ipl1AUTO) _IntHandlerSPIInstance0(void)
{
DRV_SPI_Tasks(sysObj.spiObjectIdx0);
}
void __ISR(_ETH_VECTOR, ipl5AUTO) _IntHandler_ETHMAC(void)
{
DRV_ETHMAC_Tasks_ISR((SYS_MODULE_OBJ)0);
}
/* This function is used by ETHMAC driver */
bool SYS_INT_SourceRestore(INT_SOURCE src, int level)
{
if(level)
{
SYS_INT_SourceEnable(src);
}
return level;
}
/*******************************************************************************
End of File
*/
@@ -0,0 +1,100 @@
/* 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_COMMAND layer tasks routine */
SYS_CMD_Tasks();
SYS_CONSOLE_Tasks(sysObj.sysConsole0);
SYS_DEVCON_Tasks(sysObj.sysDevcon);
/* SYS_TMR Device layer tasks routine */
SYS_TMR_Tasks(sysObj.sysTmr);
/* Maintain Device Drivers */
DRV_USART_TasksTransmit(sysObj.drvUsart0);
DRV_USART_TasksReceive(sysObj.drvUsart0);
DRV_USART_TasksError (sysObj.drvUsart0);
/* Maintain Middleware & Other Libraries */
/* Maintain the TCP/IP Stack*/
TCPIP_STACK_Task(sysObj.tcpip);
/* Maintain the application's state machine. */
APP_Tasks();
}
/*******************************************************************************
End of File
*/
@@ -0,0 +1,55 @@
#
# 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.
source "$HARMONY_VERSION_PATH/utilities/mhc/config/app_name_idx.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"
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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}
@@ -0,0 +1,489 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="62">
<logicalFolder name="root" displayName="root" projectFiles="true">
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
<logicalFolder name="f3" displayName="app" projectFiles="true">
<logicalFolder name="f1" displayName="system_config" projectFiles="true">
<logicalFolder name="f1" displayName="mx795_CC3100_e16" projectFiles="true">
<logicalFolder name="f1" displayName="framework" projectFiles="true">
<logicalFolder name="f1" displayName="driver" projectFiles="true">
<logicalFolder name="f1" displayName="rtcc" projectFiles="true">
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/rtcc/drv_rtcc_static.h</itemPath>
</logicalFolder>
<logicalFolder name="f2" displayName="spi" projectFiles="true">
<logicalFolder name="f1" displayName="static" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_local.h</itemPath>
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.h</itemPath>
</logicalFolder>
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/drv_spi_static.h</itemPath>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f3" displayName="usart" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_local.h</itemPath>
</logicalFolder>
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/usart/drv_usart_static.h</itemPath>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f2" displayName="system" projectFiles="true">
<logicalFolder name="f1" displayName="clk" projectFiles="true">
<itemPath>../src/system_config/mx795_CC3100_e16/framework/system/clk/sys_clk_static.h</itemPath>
</logicalFolder>
</logicalFolder>
</logicalFolder>
<itemPath>../src/system_config/mx795_CC3100_e16/system_config.h</itemPath>
<itemPath>../src/system_config/mx795_CC3100_e16/system_definitions.h</itemPath>
</logicalFolder>
</logicalFolder>
<itemPath>../src/app.h</itemPath>
<itemPath>../src/user_params.h</itemPath>
</logicalFolder>
<logicalFolder name="f1" displayName="framework" projectFiles="true">
<logicalFolder name="f1" displayName="driver" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/driver/driver.h</itemPath>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/driver/driver_common.h</itemPath>
</logicalFolder>
<logicalFolder name="f2" displayName="gfx" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/gfx/gfx_palette.h</itemPath>
</logicalFolder>
<logicalFolder name="f3" displayName="osal" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/osal/src/osal_impl_basic.h</itemPath>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/osal/src/osal_impl_none.h</itemPath>
</logicalFolder>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/osal/osal.h</itemPath>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/osal/osal_definitions.h</itemPath>
</logicalFolder>
<logicalFolder name="f4" displayName="peripheral" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/peripheral/peripheral.h</itemPath>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/peripheral/peripheral_common.h</itemPath>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/peripheral/peripheral_common_32bit.h</itemPath>
</logicalFolder>
<logicalFolder name="f5" displayName="system" projectFiles="true">
<logicalFolder name="f1" displayName="clk" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/clk/sys_clk.h</itemPath>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/clk/sys_clk_mapping.h</itemPath>
</logicalFolder>
<logicalFolder name="f2" displayName="common" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_common.h</itemPath>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_module.h</itemPath>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_buffer.h</itemPath>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/common/sys_queue.h</itemPath>
</logicalFolder>
<logicalFolder name="f3" displayName="console" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/console/src/sys_console_local.h</itemPath>
</logicalFolder>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/console/sys_console.h</itemPath>
</logicalFolder>
<logicalFolder name="f4" displayName="debug" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug_local.h</itemPath>
</logicalFolder>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/sys_debug.h</itemPath>
</logicalFolder>
<logicalFolder name="f5" displayName="devcon" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_local.h</itemPath>
</logicalFolder>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/sys_devcon.h</itemPath>
</logicalFolder>
<logicalFolder name="f6" displayName="int" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_private.h</itemPath>
</logicalFolder>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/sys_int.h</itemPath>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/sys_int_mapping.h</itemPath>
</logicalFolder>
<logicalFolder name="f7" displayName="ports" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/ports/sys_ports.h</itemPath>
</logicalFolder>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/system.h</itemPath>
</logicalFolder>
</logicalFolder>
<itemPath>../src/user.h</itemPath>
</logicalFolder>
<logicalFolder name="LinkerScript"
displayName="Linker Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="f1" displayName="Mongoose" projectFiles="true">
<itemPath>../../../../../mongoose.c</itemPath>
<itemPath>../../../../../mongoose.h</itemPath>
</logicalFolder>
<logicalFolder name="simplelink" displayName="simplelink" projectFiles="true">
<logicalFolder name="include" displayName="include" projectFiles="true">
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/trace.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/device.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/socket.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/fs.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/netcfg.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/netapp.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/simplelink.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/wlan_rx_filters.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/include/wlan.h</itemPath>
</logicalFolder>
<logicalFolder name="source" displayName="source" projectFiles="true">
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netcfg.c</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/device.c</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/driver.c</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/protocol.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/nonos.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/objInclusion.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/fs.c</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/wlan.c</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/driver.h</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/socket.c</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/netapp.c</itemPath>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/nonos.c</itemPath>
</logicalFolder>
<itemPath>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink/template_user.h</itemPath>
</logicalFolder>
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<logicalFolder name="f3" displayName="app" projectFiles="true">
<logicalFolder name="f1" displayName="system_config" projectFiles="true">
<logicalFolder name="f1" displayName="mx795_CC3100_e16" projectFiles="true">
<logicalFolder name="f1" displayName="framework" projectFiles="true">
<logicalFolder name="f1" displayName="driver" projectFiles="true">
<logicalFolder name="f1" displayName="rtcc" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/rtcc/src/drv_rtcc_static.c</itemPath>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f2" displayName="spi" projectFiles="true">
<logicalFolder name="f1" displayName="static" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static.c</itemPath>
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_mapping.c</itemPath>
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_tasks.c</itemPath>
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_sys_queue.c</itemPath>
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/spi/static/src/drv_spi_static_rm_tasks.c</itemPath>
</logicalFolder>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f3" displayName="usart" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_mapping.c</itemPath>
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static.c</itemPath>
<itemPath>../src/system_config/mx795_CC3100_e16/framework/driver/usart/src/drv_usart_static_byte_model.c</itemPath>
</logicalFolder>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f2" displayName="system" projectFiles="true">
<logicalFolder name="f1" displayName="clk" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../src/system_config/mx795_CC3100_e16/framework/system/clk/src/sys_clk_static.c</itemPath>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f2" displayName="console" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../src/system_config/mx795_CC3100_e16/framework/system/console/src/sys_console_static.c</itemPath>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f3" displayName="ports" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../src/system_config/mx795_CC3100_e16/framework/system/ports/src/sys_ports_static.c</itemPath>
</logicalFolder>
</logicalFolder>
</logicalFolder>
</logicalFolder>
<itemPath>../src/system_config/mx795_CC3100_e16/system_init.c</itemPath>
<itemPath>../src/system_config/mx795_CC3100_e16/system_interrupt.c</itemPath>
<itemPath>../src/system_config/mx795_CC3100_e16/system_exceptions.c</itemPath>
<itemPath>../src/system_config/mx795_CC3100_e16/system_tasks.c</itemPath>
</logicalFolder>
</logicalFolder>
<itemPath>../src/app.c</itemPath>
<itemPath>../src/main.c</itemPath>
<itemPath>../src/cc3100_port.c</itemPath>
</logicalFolder>
<logicalFolder name="f1" displayName="framework" projectFiles="true">
<logicalFolder name="f1" displayName="system" projectFiles="true">
<logicalFolder name="f1" displayName="debug" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug.c</itemPath>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f2" displayName="devcon" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon.c</itemPath>
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_pic32mx.c</itemPath>
</logicalFolder>
</logicalFolder>
<logicalFolder name="f3" displayName="int" projectFiles="true">
<logicalFolder name="f1" displayName="src" projectFiles="true">
<itemPath>../../../../../../../../../microchip/harmony/v1_08_01/framework/system/int/src/sys_int_pic32.c</itemPath>
</logicalFolder>
</logicalFolder>
</logicalFolder>
</logicalFolder>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<sourceRootList>
<Elem>../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink</Elem>
<Elem>../../../../../../../go/src/cesanta.com/mongoose</Elem>
<Elem>../../../../../../../microchip/harmony/v1_08_01</Elem>
<Elem>../../../../../../../../../CC3100SDK_1.2.0/cc3100-sdk/simplelink</Elem>
<Elem>../../../../..</Elem>
</sourceRootList>
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="mx795_CC3100_e16" type="2">
<toolsSet>
<developmentServer>localhost</developmentServer>
<targetDevice>PIC32MX795F512L</targetDevice>
<targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard>
<platformTool>PKOBSKDEPlatformTool</platformTool>
<languageToolchain>XC32</languageToolchain>
<languageToolchainVersion>1.42</languageToolchainVersion>
<platform>2</platform>
</toolsSet>
<compileType>
<linkerTool>
<linkerLibItems>
<linkerLibFileItem>../../../../../../../../../microchip/harmony/v1_08_01/bin/framework/peripheral/PIC32MX795F512L_peripherals.a</linkerLibFileItem>
<linkerLibFileItem>../../../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/crypto/aes_pic32mx.a</linkerLibFileItem>
</linkerLibItems>
</linkerTool>
<archiverTool>
</archiverTool>
<loading>
<useAlternateLoadableFile>false</useAlternateLoadableFile>
<parseOnProdLoad>false</parseOnProdLoad>
<alternateLoadableFile></alternateLoadableFile>
</loading>
</compileType>
<makeCustomizationType>
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
<makeCustomizationPreStep></makeCustomizationPreStep>
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
<makeCustomizationPostStep></makeCustomizationPostStep>
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
</makeCustomizationType>
<C32>
<property key="additional-warnings" value="false"/>
<property key="addresss-attribute-use" value="false"/>
<property key="enable-app-io" value="false"/>
<property key="enable-omit-frame-pointer" value="false"/>
<property key="enable-symbols" value="true"/>
<property key="enable-unroll-loops" value="false"/>
<property key="exclude-floating-point" value="false"/>
<property key="extra-include-directories"
value="../src;../src/system_config/mx795_CC3100_e16;../src/mx795_CC3100_e16;../../../../framework;../src/system_config/mx795_CC3100_e16/framework;../../../../../../../../../microchip/harmony/v1_08_01/framework"/>
<property key="generate-16-bit-code" value="false"/>
<property key="generate-micro-compressed-code" value="false"/>
<property key="isolate-each-function" value="true"/>
<property key="make-warnings-into-errors" value="false"/>
<property key="optimization-level" value="-O1"/>
<property key="place-data-into-section" value="false"/>
<property key="post-instruction-scheduling" value="default"/>
<property key="pre-instruction-scheduling" value="default"/>
<property key="preprocessor-macros" value=""/>
<property key="strict-ansi" value="false"/>
<property key="support-ansi" value="false"/>
<property key="toplevel-reordering" value=""/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
<property key="use-indirect-calls" value="false"/>
</C32>
<C32-AR>
<property key="additional-options-chop-files" value="false"/>
</C32-AR>
<C32-AS>
<property key="assembler-symbols" value=""/>
<property key="enable-symbols" value="true"/>
<property key="exclude-floating-point-library" value="false"/>
<property key="expand-macros" value="false"/>
<property key="extra-include-directories-for-assembler" value=""/>
<property key="extra-include-directories-for-preprocessor" value=""/>
<property key="false-conditionals" value="false"/>
<property key="generate-16-bit-code" value="false"/>
<property key="generate-micro-compressed-code" value="false"/>
<property key="keep-locals" value="false"/>
<property key="list-assembly" value="false"/>
<property key="list-source" value="false"/>
<property key="list-symbols" value="false"/>
<property key="oXC32asm-list-to-file" value="false"/>
<property key="omit-debug-dirs" value="false"/>
<property key="omit-forms" value="false"/>
<property key="preprocessor-macros" value=""/>
<property key="warning-level" value=""/>
</C32-AS>
<C32-LD>
<property key="additional-options-use-response-files" value="false"/>
<property key="allocate-dinit" value="false"/>
<property key="code-dinit" value="false"/>
<property key="ebase-addr" value=""/>
<property key="enable-check-sections" value="false"/>
<property key="exclude-floating-point-library" value="false"/>
<property key="exclude-standard-libraries" value="false"/>
<property key="extra-lib-directories" value=""/>
<property key="fill-flash-options-addr" value=""/>
<property key="fill-flash-options-const" value=""/>
<property key="fill-flash-options-how" value="0"/>
<property key="fill-flash-options-inc-const" value="1"/>
<property key="fill-flash-options-increment" value=""/>
<property key="fill-flash-options-seq" value=""/>
<property key="fill-flash-options-what" value="0"/>
<property key="generate-16-bit-code" value="false"/>
<property key="generate-cross-reference-file" value="false"/>
<property key="generate-micro-compressed-code" value="false"/>
<property key="heap-size" value="2048"/>
<property key="input-libraries" value=""/>
<property key="kseg-length" value=""/>
<property key="kseg-origin" value=""/>
<property key="linker-symbols" value=""/>
<property key="map-file" value="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map"/>
<property key="no-startup-files" value="false"/>
<property key="oXC32ld-extra-opts" value=""/>
<property key="optimization-level" value=""/>
<property key="preprocessor-macros" value=""/>
<property key="remove-unused-sections" value="true"/>
<property key="report-memory-usage" value="false"/>
<property key="serial-length" value=""/>
<property key="serial-origin" value=""/>
<property key="stack-size" value=""/>
<property key="symbol-stripping" value=""/>
<property key="trace-symbols" value=""/>
<property key="warn-section-align" value="false"/>
</C32-LD>
<C32CPP>
<property key="additional-warnings" value="false"/>
<property key="addresss-attribute-use" value="false"/>
<property key="check-new" value="false"/>
<property key="eh-specs" value="true"/>
<property key="enable-app-io" value="false"/>
<property key="enable-omit-frame-pointer" value="false"/>
<property key="enable-symbols" value="true"/>
<property key="enable-unroll-loops" value="false"/>
<property key="exceptions" value="true"/>
<property key="exclude-floating-point" value="false"/>
<property key="extra-include-directories" value=""/>
<property key="generate-16-bit-code" value="false"/>
<property key="generate-micro-compressed-code" value="false"/>
<property key="isolate-each-function" value="true"/>
<property key="make-warnings-into-errors" value="false"/>
<property key="optimization-level" value="-O1"/>
<property key="place-data-into-section" value="false"/>
<property key="post-instruction-scheduling" value="default"/>
<property key="pre-instruction-scheduling" value="default"/>
<property key="preprocessor-macros" value=""/>
<property key="rtti" value="true"/>
<property key="strict-ansi" value="false"/>
<property key="toplevel-reordering" value=""/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
<property key="use-indirect-calls" value="false"/>
</C32CPP>
<C32Global>
<property key="common-include-directories"
value="/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/include"/>
<property key="gp-relative-option" value=""/>
<property key="legacy-libc" value="false"/>
<property key="relaxed-math" value="false"/>
<property key="save-temps" value="false"/>
<property key="wpo-lto" value="false"/>
<appendMe value="-DEXT_LIB_REGISTERED_GENERAL_EVENTS -DSL_FULL -DCS_PLATFORM=6 -DMG_SIMPLELINK_NO_OSI"/>
</C32Global>
<PICkit3PlatformTool>
<property key="ADC 1" value="true"/>
<property key="AutoSelectMemRanges" value="auto"/>
<property key="CHANGE NOTICE" value="true"/>
<property key="COMPARATOR" value="true"/>
<property key="CTMU" value="true"/>
<property key="DMA" value="true"/>
<property key="Freeze All Other Peripherals" value="true"/>
<property key="I2C1" value="true"/>
<property key="I2C2" value="true"/>
<property key="INPUT CAPTURE 1" value="true"/>
<property key="INPUT CAPTURE 2" value="true"/>
<property key="INPUT CAPTURE 3" value="true"/>
<property key="INPUT CAPTURE 4" value="true"/>
<property key="INPUT CAPTURE 5" value="true"/>
<property key="INTERRUPT CONTROL" value="true"/>
<property key="OUTPUT COMPARE 1" value="true"/>
<property key="OUTPUT COMPARE 2" value="true"/>
<property key="OUTPUT COMPARE 3" value="true"/>
<property key="OUTPUT COMPARE 4" value="true"/>
<property key="OUTPUT COMPARE 5" value="true"/>
<property key="PARALLEL MASTER/SLAVE PORT" value="true"/>
<property key="REAL TIME CLOCK" value="true"/>
<property key="SPI/I2S 1" value="true"/>
<property key="SPI/I2S 2" value="true"/>
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
<property key="TIMER1" value="true"/>
<property key="TIMER2" value="true"/>
<property key="TIMER3" value="true"/>
<property key="TIMER4" value="true"/>
<property key="TIMER5" value="true"/>
<property key="ToolFirmwareFilePath"
value="Press to browse for a specific firmware version"/>
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
<property key="UART1" value="true"/>
<property key="UART2" value="true"/>
<property key="hwtoolclock.frcindebug" value="false"/>
<property key="memories.aux" value="false"/>
<property key="memories.bootflash" value="true"/>
<property key="memories.configurationmemory" value="true"/>
<property key="memories.eeprom" value="true"/>
<property key="memories.flashdata" value="true"/>
<property key="memories.id" value="true"/>
<property key="memories.programmemory" value="true"/>
<property key="memories.programmemory.end" value="0x1d003fff"/>
<property key="memories.programmemory.start" value="0x1d000000"/>
<property key="poweroptions.powerenable" value="false"/>
<property key="programmertogo.imagename" value=""/>
<property key="programoptions.donoteraseauxmem" value="false"/>
<property key="programoptions.eraseb4program" value="true"/>
<property key="programoptions.pgmspeed" value="2"/>
<property key="programoptions.preserveeeprom" value="false"/>
<property key="programoptions.preserveprogramrange" value="false"/>
<property key="programoptions.preserveprogramrange.end" value="0x1d003fff"/>
<property key="programoptions.preserveprogramrange.start" value="0x1d000000"/>
<property key="programoptions.preserveuserid" value="false"/>
<property key="programoptions.testmodeentrymethod" value="VPPFirst"/>
<property key="programoptions.usehighvoltageonmclr" value="false"/>
<property key="programoptions.uselvpprogramming" value="false"/>
<property key="voltagevalue" value="3.25"/>
</PICkit3PlatformTool>
<PKOBSKDEPlatformTool>
<property key="AutoSelectMemRanges" value="auto"/>
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
<property key="ToolFirmwareFilePath"
value="Press to browse for a specific firmware version"/>
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
<property key="firmware.download.all" value="false"/>
<property key="memories.configurationmemory" value="true"/>
<property key="memories.dataflash" value="true"/>
<property key="memories.eeprom" value="true"/>
<property key="memories.id" value="true"/>
<property key="memories.programmemory" value="true"/>
<property key="memories.programmemory.end" value="0x1d07ffff"/>
<property key="memories.programmemory.start" value="0x1d000000"/>
<property key="memories.userotp" value="true"/>
<property key="programoptions.donoteraseauxmem" value="false"/>
<property key="programoptions.eraseb4program" value="true"/>
<property key="programoptions.preservedataflash" value="false"/>
<property key="programoptions.preserveeeprom" value="false"/>
<property key="programoptions.preserveprogramrange" value="false"/>
<property key="programoptions.preserveprogramrange.end" value="0x1d0001ff"/>
<property key="programoptions.preserveprogramrange.start" value="0x1d000000"/>
<property key="programoptions.usehighvoltageonmclr" value="false"/>
<property key="programoptions.uselvpprogramming" value="true"/>
</PKOBSKDEPlatformTool>
</conf>
</confs>
</configurationDescriptor>
@@ -0,0 +1,3 @@
#
#Thu Sep 29 17:49:40 EEST 2016
pkobskde/DEVID_MISMATCH=true
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="62">
<projectmakefile>Makefile</projectmakefile>
<defaultConf>0</defaultConf>
<confs>
<conf name="mx795_CC3100_e16" type="2">
<platformToolSN>:=MPLABComm-USB-Microchip:=&lt;vid>04D8:=&lt;pid>8107:=&lt;rev>0002:=&lt;man>Microchip Technology Incorporated:=&lt;prod>Explorer 16/32 PICkit on Board:=&lt;sn>BUR162971352:=&lt;drv>x:=&lt;xpt>h:=end</platformToolSN>
<languageToolchainDir>/opt/microchip/xc32/v1.42/bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>
<placeholder2>place holder 2</placeholder2>
</mdbdebugger>
<runprofile version="6">
<args></args>
<rundir></rundir>
<buildfirst>true</buildfirst>
<console-type>0</console-type>
<terminal-type>0</terminal-type>
<remove-instrumentation>0</remove-instrumentation>
<environment>
</environment>
</runprofile>
</conf>
</confs>
</configurationDescriptor>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/home/alex/microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon.c</file>
<file>file:/home/alex/microchip/harmony/v1_08_01/framework/system/debug/src/sys_debug.c</file>
<file>file:/home/alex/microchip/harmony/v1_08_01/framework/system/devcon/src/sys_devcon_pic32mx.c</file>
<file>file:/home/alex/CC3100SDK_1.2.0/cc3100-sdk/simplelink/source/spawn.c</file>
<file>file:/home/alex/microchip/harmony/v1_08_01/framework/system/int/src/sys_int_pic32.c</file>
</group>
</open-files>
</project-private>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
<configuration>
<Harmony xmlns="Harmony" MHC="true"/>
<data xmlns="http://www.netbeans.org/ns/make-project/1">
<name>mqtt_client</name>
<creation-uuid>e54023e9-3948-44ef-bf6f-29d8b223e555</creation-uuid>
<make-project-type>0</make-project-type>
<c-extensions>c</c-extensions>
<cpp-extensions/>
<header-extensions>h</header-extensions>
<asminc-extensions/>
<sourceEncoding>ISO-8859-1</sourceEncoding>
<make-dep-projects/>
</data>
</configuration>
</project>
@@ -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"
@@ -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;
}
}
@@ -0,0 +1,126 @@
/*
* Copyright (c) 2016 Cesanta Software Limited
* All rights reserved
*/
#ifndef _APP_H
#define _APP_H
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#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:
<code>
APP_Initialize();
</code>
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:
<code>
APP_Tasks();
</code>
Remarks:
This routine must be called from SYS_Tasks() routine.
*/
void APP_Tasks(void);
#ifdef __cplusplus
}
#endif
#endif /* _APP_H */
@@ -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;
}
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2016 Cesanta Software Limited
* All rights reserved
*/
#include <stddef.h>
#include <stdlib.h>
#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);
}
@@ -0,0 +1,328 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configuration version="1.0.8.7">
<Designer>
<Assets>
<Settings bpp="16">
<MemoryLocations>
<MemoryLocation address="0" id="default"/>
</MemoryLocations>
</Settings>
</Assets>
<Screens height="200" width="320">
<Screen active="true" background="000000" clearOnShow="true" doubleBuffer="false" export="true" name="Screen1" primary="true" visible="true">
<Objects/>
</Screen>
</Screens>
<Schemes defaultSchemeName="default">
<Scheme name="default">
<Alpha>100</Alpha>
<BackgroundOffset>0,0</BackgroundOffset>
<EmbossSize>3</EmbossSize>
<Colors>
<Primary>FFFFFF</Primary>
<Secondary>404040</Secondary>
<Disabled>C0C0C0</Disabled>
<Background>000000</Background>
<EmbossLight>C0C0C0</EmbossLight>
<EmbossDark>404040</EmbossDark>
<TextPrimary>000000</TextPrimary>
<TextSecondary>FFFFFF</TextSecondary>
<TextDisabled>404040</TextDisabled>
<GradientStart>000000</GradientStart>
<GradientEnd>FFFFFF</GradientEnd>
</Colors>
<FillStyle>Color</FillStyle>
<BackgroundType>None</BackgroundType>
</Scheme>
</Schemes>
</Designer>
<General>
<HarmonyPath path="../../../../../../../microchip/harmony/v1_08_01"/>
<Processor name=""/>
<ForceOptimization flag="true"/>
<MergeStrategy flag="USER_ALL"/>
</General>
<Manifest>
<Files>
<File>
<Name>osal_impl_basic.h</Name>
<Path>Header Files/framework/osal/src</Path>
</File>
<File>
<Name>peripheral_common_32bit.h</Name>
<Path>Header Files/framework/peripheral</Path>
</File>
<File>
<Name>driver_common.h</Name>
<Path>Header Files/framework/driver</Path>
</File>
<File>
<Name>sys_devcon.c</Name>
<Path>Source Files/framework/system/devcon/src</Path>
</File>
<File>
<Name>osal.h</Name>
<Path>Header Files/framework/osal</Path>
</File>
<File>
<Name>sys_ports.h</Name>
<Path>Header Files/framework/system/ports</Path>
</File>
<File>
<Name>driver.h</Name>
<Path>Header Files/framework/driver</Path>
</File>
<File>
<Name>peripheral_common.h</Name>
<Path>Header Files/framework/peripheral</Path>
</File>
<File>
<Name>sys_debug_local.h</Name>
<Path>Header Files/framework/system/debug/src</Path>
</File>
<File>
<Name>sys_common.h</Name>
<Path>Header Files/framework/system/common</Path>
</File>
<File>
<Name>sys_buffer.h</Name>
<Path>Header Files/framework/system/common</Path>
</File>
<File>
<Name>sys_int_pic32.c</Name>
<Path>Source Files/framework/system/int/src</Path>
</File>
<File>
<Name>sys_clk.h</Name>
<Path>Header Files/framework/system/clk</Path>
</File>
<File>
<Name>osal_impl_none.h</Name>
<Path>Header Files/framework/osal/src</Path>
</File>
<File>
<Name>sys_clk_mapping.h</Name>
<Path>Header Files/framework/system/clk</Path>
</File>
<File>
<Name>osal_definitions.h</Name>
<Path>Header Files/framework/osal</Path>
</File>
<File>
<Name>sys_int_mapping.h</Name>
<Path>Header Files/framework/system/int</Path>
</File>
<File>
<Name>gfx_palette.h</Name>
<Path>Header Files/framework/gfx</Path>
</File>
<File>
<Name>sys_int_private.h</Name>
<Path>Header Files/framework/system/int/src</Path>
</File>
<File>
<Name>sys_devcon.h</Name>
<Path>Header Files/framework/system/devcon</Path>
</File>
<File>
<Name>system.h</Name>
<Path>Header Files/framework/system</Path>
</File>
<File>
<Name>sys_debug.c</Name>
<Path>Source Files/framework/system/debug/src</Path>
</File>
<File>
<Name>sys_console.h</Name>
<Path>Header Files/framework/system/console</Path>
</File>
<File>
<Name>sys_debug.h</Name>
<Path>Header Files/framework/system/debug</Path>
</File>
<File>
<Name>sys_module.h</Name>
<Path>Header Files/framework/system/common</Path>
</File>
<File>
<Name>sys_devcon_pic32mx.c</Name>
<Path>Source Files/framework/system/devcon/src</Path>
</File>
<File>
<Name>sys_devcon_local.h</Name>
<Path>Header Files/framework/system/devcon/src</Path>
</File>
<File>
<Name>peripheral.h</Name>
<Path>Header Files/framework/peripheral</Path>
</File>
<File>
<Name>sys_queue.h</Name>
<Path>Header Files/framework/system/common</Path>
</File>
<File>
<Name>sys_console_local.h</Name>
<Path>Header Files/framework/system/console/src</Path>
</File>
<File>
<Name>sys_int.h</Name>
<Path>Header Files/framework/system/int</Path>
</File>
</Files>
<Templates>
<Template>
<Name>sys_console_static.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/system/console/src</Path>
<Checksum>0B506F1F6112899EF538390AD8DBD62F</Checksum>
</Template>
<Template>
<Name>system_definitions.h</Name>
<Path>Header Files/app/system_config/mx795_CC3100_e16</Path>
<Checksum>1F863F474CF6B1EF5BCAEC53DA0A1EB9</Checksum>
</Template>
<Template>
<Name>system_exceptions.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16</Path>
<Checksum>C111969CA43D6CEA1E9E33A6164E7AE0</Checksum>
</Template>
<Template>
<Name>drv_spi_static_local.h</Name>
<Path>Header Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src</Path>
<Checksum>70055803006A2C67E983956B3B3ABD25</Checksum>
</Template>
<Template>
<Name>drv_spi_mapping.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src</Path>
<Checksum>ADEEE2519E932B46D44C41B8F44E1F19</Checksum>
</Template>
<Template>
<Name>drv_usart_static_byte_model.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/driver/usart/src</Path>
<Checksum>F91C429976AC25EB8B3639F0B0356E3B</Checksum>
</Template>
<Template>
<Name>system_init.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16</Path>
<Checksum>34219E31193F143A502765E488BC500E</Checksum>
<ProjectFileChecksum>368F06F4DCF995EE27BD5F31F9034D30</ProjectFileChecksum>
</Template>
<Template>
<Name>drv_usart_static.h</Name>
<Path>Header Files/app/system_config/mx795_CC3100_e16/framework/driver/usart</Path>
<Checksum>AE37BD63B6EC9F6ADD6B8006CE192FCB</Checksum>
</Template>
<Template>
<Name>drv_spi_static_tasks.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src</Path>
<Checksum>8D9BDD4F87493B036E9786F53F65EE82</Checksum>
</Template>
<Template>
<Name>drv_spi_static.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src</Path>
<Checksum>C0323F1E5F9550BF1BC4441ADB9B09D8</Checksum>
</Template>
<Template>
<Name>drv_rtcc_static.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/driver/rtcc/src</Path>
<Checksum>9A5D97DC0EADF32162B4B222AAC95408</Checksum>
</Template>
<Template>
<Name>sys_clk_static.h</Name>
<Path>Header Files/app/system_config/mx795_CC3100_e16/framework/system/clk</Path>
<Checksum>B4BD59D8D7C4DA95DC5E3B57755FD352</Checksum>
</Template>
<Template>
<Name>system_config.h</Name>
<Path>Header Files/app/system_config/mx795_CC3100_e16</Path>
<Checksum>85CDEB06EBF7053ADCB2CB37014D10D1</Checksum>
</Template>
<Template>
<Name>drv_usart_static_local.h</Name>
<Path>Header Files/app/system_config/mx795_CC3100_e16/framework/driver/usart/src</Path>
<Checksum>62F7F49D6A443F111DA38971475472FD</Checksum>
</Template>
<Template>
<Name>system_interrupt.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16</Path>
<Checksum>CACF8AB870174547FD1DC4FE62DECBAD</Checksum>
<ProjectFileChecksum>DB1F2DBEF12282D8AF55C36D1192E873</ProjectFileChecksum>
</Template>
<Template>
<Name>sys_clk_static.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/system/clk/src</Path>
<Checksum>E8C935BED4628875A8C3428DDD07355C</Checksum>
</Template>
<Template>
<Name>drv_spi_static.h</Name>
<Path>Header Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static</Path>
<Checksum>68B5BA023AB90B18D229B6E7CBF0850C</Checksum>
</Template>
<Template>
<Name>drv_usart_mapping.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/driver/usart/src</Path>
<Checksum>115DDE4372E58D4116BC77DC36FD97DC</Checksum>
</Template>
<Template>
<Name>main.c</Name>
<Path>Source Files/app</Path>
</Template>
<Template>
<Name>drv_spi_static_sys_queue.h</Name>
<Path>Header Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src</Path>
<Checksum>3D489FB0B5415BB6F80FA34FC0CEE9F7</Checksum>
</Template>
<Template>
<Name>drv_spi_static_rm_tasks.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src</Path>
<Checksum>BED98A3F5628502709D95341DC70019B</Checksum>
</Template>
<Template>
<Name>app.c</Name>
<Path>Source Files/app</Path>
</Template>
<Template>
<Name>sys_ports_static.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/system/ports/src</Path>
<Checksum>F693DCC21C702581B107B8A238195A13</Checksum>
</Template>
<Template>
<Name>drv_spi_static_sys_queue.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/driver/spi/static/src</Path>
<Checksum>E06222D2E5F5F69EE3C77ACD6FCC3059</Checksum>
</Template>
<Template>
<Name>system_tasks.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16</Path>
<Checksum>9990FEA6D9BDD86EAA2B873D5A5B9DAC</Checksum>
<ProjectFileChecksum>91547DE270F61E54B606034EBF1BAEC1</ProjectFileChecksum>
</Template>
<Template>
<Name>app.h</Name>
<Path>Header Files/app</Path>
</Template>
<Template>
<Name>drv_rtcc_static.h</Name>
<Path>Header Files/app/system_config/mx795_CC3100_e16/framework/driver/rtcc</Path>
<Checksum>FED59BF02817E49C245011170B963EE2</Checksum>
</Template>
<Template>
<Name>drv_usart_static.c</Name>
<Path>Source Files/app/system_config/mx795_CC3100_e16/framework/driver/usart/src</Path>
<Checksum>BD4DEFD647BB5AF32D1DBF352D6139D5</Checksum>
</Template>
</Templates>
<CompilerItems>
<C32>
<Include value="/home/alex/go/src/cesanta.com/mongoose/examples/PIC32/mqtt_client/firmware/src"/>
<Include value="/home/alex/go/src/cesanta.com/mongoose/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16"/>
<Include value="/home/alex/go/src/cesanta.com/mongoose/examples/PIC32/mqtt_client/firmware/src/mx795_CC3100_e16"/>
<Include value="/home/alex/microchip/harmony/v1_08_01/framework"/>
<Include value="/home/alex/go/src/cesanta.com/mongoose/examples/PIC32/mqtt_client/firmware/src/system_config/mx795_CC3100_e16/framework"/>
</C32>
</CompilerItems>
<Libraries>
<Library value="../../../../../../../../../microchip/harmony/v1_08_01/framework/tcpip/src/crypto/aes_pic32mx.a"/>
<Library value="../../../../../../../../../microchip/harmony/v1_08_01/bin/framework/peripheral/PIC32MX795F512L_peripherals.a"/>
</Libraries>
</Manifest>
</configuration>
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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 <string.h>
#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;
}
@@ -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) ((a<b) ? b : a)
#define MIN(a,b) ((b<a) ? b : a)
#define PLIB_SPI_RX_8BIT_FIFO_SIZE(index) 16
#define PLIB_SPI_RX_8BIT_HW_MARK(index) 8
#define PLIB_SPI_RX_16BIT_FIFO_SIZE(index) 8
#define PLIB_SPI_RX_16BIT_HW_MARK(index) 4
#define PLIB_SPI_RX_32BIT_FIFO_SIZE(index) 4
#define PLIB_SPI_RX_32BIT_HW_MARK(index) 2
#define PLIB_SPI_TX_8BIT_FIFO_SIZE(index) 16
#define PLIB_SPI_TX_8BIT_LW_MARK(index) 8
#define PLIB_SPI_TX_16BIT_FIFO_SIZE(index) 8
#define PLIB_SPI_TX_16BIT_LW_MARK(index) 4
#define PLIB_SPI_TX_32BIT_FIFO_SIZE(index) 4
#define PLIB_SPI_TX_32BIT_LW_MARK(index) 2
struct DRV_SPI_OBJ;
/* SPI Job object. */
typedef struct _DRV_SPI_JOB_OBJECT
{
uint8_t *txBuffer;
uint8_t *rxBuffer;
size_t dataTxed;
size_t dataRxed;
size_t dataLeftToTx;
size_t dummyLeftToTx;
size_t dataLeftToRx;
size_t dummyLeftToRx;
DRV_SPI_BUFFER_EVENT status;
DRV_SPI_BUFFER_EVENT_HANDLER completeCB;
void * context;
}DRV_SPI_JOB_OBJECT;
// *****************************************************************************
/* SPI Static Driver Instance Object
Summary:
Object used to keep any data required for the static SPI driver.
Description:
This object is used to keep track of any data that must be maintained to
manage the SPI static driver.
Remarks:
None.
*/
typedef struct DRV_SPI_OBJ
{
uint8_t numTrfsSmPolled;
bool errEnabled;
DRV_SPI_BUFFER_EVENT_HANDLER operationStarting;
DRV_SPI_BUFFER_EVENT_HANDLER operationEnded;
DRV_SPI_SYS_QUEUE_HANDLE queue;
DRV_SPI_JOB_OBJECT * currentJob;
bool txEnabled;
bool rxEnabled;
uint8_t symbolsInProgress;
} DRV_SPI_OBJ;
// *****************************************************************************
// *****************************************************************************
// Section: Queue related Data Type Definitions
// *****************************************************************************
// *****************************************************************************
typedef struct _DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA
{
struct _DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pNext;
}DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA;
typedef struct _DRV_SPI_SYS_QUEUE_QUEUE_DATA
{
void * pQueueManager;
DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pHead;
DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pTail;
DRV_SPI_SYS_QUEUE_INTERUPT_CHANGE fptrIntChange;
size_t numReserved;
size_t maxElements;
size_t numAlloc;
struct _DRV_SPI_SYS_QUEUE_QUEUE_DATA * pNext;
size_t numEnqueued;
size_t numAllocOps;
size_t numFreeOps;
size_t numDequeueOps;
size_t numEnqueueOps;
size_t numReserveLW;
size_t numAllocHW;
size_t numEnqueuedHW;
size_t outOfMemoryErrors;
}DRV_SPI_SYS_QUEUE_QUEUE_DATA;
typedef struct _DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA
{
DRV_SPI_SYS_QUEUE_QUEUE_DATA * pQueueArea;
DRV_SPI_SYS_QUEUE_QUEUE_DATA * pFreeQueueHead;
DRV_SPI_SYS_QUEUE_QUEUE_DATA * pFreeQueueTail;
DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pElementArea;
DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pFreeElementHead;
DRV_SPI_SYS_QUEUE_FIFO_ELEMENT_DATA * pFreeElementTail;
size_t numReserveElements;
size_t numFreeElements;
size_t numAllocOps;
size_t numFreeOps;
size_t numQueueCreateOps;
size_t numQueueDestroyOps;
size_t freeElementsLW;
size_t reserveElementsLW;
size_t outOfMemoryErrors;
uint8_t numQueues;
uint8_t numQueuesHW;
}DRV_SPI_SYS_QUEUE_QUEUE_MANAGER_DATA;
// *****************************************************************************
// *****************************************************************************
// Section: Local functions.
// *****************************************************************************
// *****************************************************************************
int32_t DRV_SPI0_PolledMasterRM8BitTasks ( struct DRV_SPI_OBJ * dObj );
int32_t DRV_SPI0_PolledErrorTasks(struct DRV_SPI_OBJ * dObj);
int32_t DRV_SPI0_MasterRMSend8BitPolled( struct DRV_SPI_OBJ * dObj );
int32_t DRV_SPI0_MasterRMReceive8BitPolled( struct DRV_SPI_OBJ * dObj );
// DOM-IGNORE-BEGIN
#ifdef __cplusplus
}
#endif
// DOM-IGNORE-END
#endif //#ifndef _DRV_SPI_STATIC_LOCAL_H
/*******************************************************************************
End of File
*/
@@ -0,0 +1,124 @@
/* clang-format off */
/*******************************************************************************
SPI Driver Functions for Static Standard Buffer Driver Tasks Functions
Company:
Microchip Technology Inc.
File Name:
drv_spi_static_rm_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_rm_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_MasterRMSend8BitPolled( struct DRV_SPI_OBJ * pDrvObj )
{
register DRV_SPI_JOB_OBJECT * currentJob = pDrvObj->currentJob;
/* 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;
}
@@ -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 <string.h>
#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;
}
@@ -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_
@@ -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;
}
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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 <stdint.h>
#include <stdbool.h>
#include <stddef.h>
#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
*/
@@ -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:
<code>
uint32_t sysClockHz;
sysClockHz = SYS_CLK_SystemFrequencyGet ( );
</code>
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:
<code>
unsigned long peripheralClockHz;
peripheralClockHz = SYS_CLK_PeripheralFrequencyGet ( CLK_BUS_PERIPHERAL_5 );
</code>
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:
<code>
unsigned long sysClockOutputHz;
sysClockOutputHz = SYS_CLK_ReferenceClockFrequencyGet ( CLK_BUS_REFERENCE_3
);
</code>
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));
}
@@ -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
*/
@@ -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
*/
@@ -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
*/
@@ -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
@@ -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
*/
@@ -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 <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#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
*/
@@ -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 <xc.h> /* 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
<editor-fold defaultstate="expanded" desc="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"
};
// </editor-fold>
// *****************************************************************************
// *****************************************************************************
// 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
*/
@@ -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
// ****************************************************************************
// ****************************************************************************
// <editor-fold defaultstate="collapsed" desc="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
// </editor-fold>
// *****************************************************************************
// *****************************************************************************
// Section: Driver Initialization Data
// *****************************************************************************
// *****************************************************************************
// <editor-fold defaultstate="collapsed" desc="DRV_SPI Initialization Data">
/*** SPI Driver Initialization Data ***/
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="DRV_USART Initialization Data">
// </editor-fold>
// *****************************************************************************
// *****************************************************************************
// Section: System Data
// *****************************************************************************
// *****************************************************************************
/* Structure to hold the object handles for the modules in the system. */
SYSTEM_OBJECTS sysObj;
// *****************************************************************************
// *****************************************************************************
// Section: Module Initialization Data
// *****************************************************************************
// *****************************************************************************
// <editor-fold defaultstate="collapsed" desc="SYS_CONSOLE Initialization Data">
// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="SYS_DEBUG Initialization Data">
/*** System Debug Initialization Data ***/
SYS_DEBUG_INIT debugInit =
{
.moduleInit = {0},
.errorLevel = SYS_ERROR_FATAL
};
// </editor-fold>
//<editor-fold defaultstate="collapsed" desc="SYS_DEVCON Initialization Data">
/*******************************************************************************
Device Control System Service Initialization Data
*/
const SYS_DEVCON_INIT sysDevconInit =
{
.moduleInit = {0},
};
// </editor-fold>
// *****************************************************************************
// *****************************************************************************
// 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
*/
@@ -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 <xc.h>
#include <sys/attribs.h>
#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
*/
@@ -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
*/
File diff suppressed because it is too large. Load diff
@@ -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 */