Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
CC32xxHelper.cxx File Reference
#include "freertos_drivers/ti/CC32xxHelper.hxx"
#include "utils/logging.h"
#include "utils/macros.h"
#include "simplelink.h"
#include "fs.h"

Go to the source code of this file.

Functions

void SlCheckResult (int result, int expected)
 Tests that a SimpleLink request has succeeded.
 
void SlCheckError (int result)
 Tests that a SimpleLink request has succeeded (return >= 0).
 
int SlDeleteFile (const void *filename)
 Deletes a file from sflash.
 

Variables

volatile int g_last_sl_result
 

Detailed Description

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Common helper routines for the TI SimpleLink API.

Author
Balazs Racz
Date
30 December 2016

Definition in file CC32xxHelper.cxx.

Macro Definition Documentation

◆ SUPPORT_SL_R1_API

#define SUPPORT_SL_R1_API

Definition at line 34 of file CC32xxHelper.cxx.

Function Documentation

◆ SlCheckError()

void SlCheckError ( int  result)

Tests that a SimpleLink request has succeeded (return >= 0).

Performs internal debugging when it failed and crashes.

Parameters
resultis the returned value from the simplelink driver

Definition at line 51 of file CC32xxHelper.cxx.

◆ SlCheckResult()

void SlCheckResult ( int  result,
int  expected = 0 
)

Tests that a SimpleLink request has succeeded.

Performs internal debugging when it failed and crashes.

Parameters
resultis the returned value from the simplelink driver
expectedis the expected return code.

Definition at line 45 of file CC32xxHelper.cxx.

◆ SlDeleteFile()

int SlDeleteFile ( const void *  filename)

Deletes a file from sflash.

This routine works around the error SL_FS_FILE_HAS_NOT_BEEN_CLOSE_CORRECTLY which prevents deleting a file.

Parameters
filenameserial-flash file name to delete.
Returns
the result code from the last delete operation. It is OK for this to be non zero.

Definition at line 57 of file CC32xxHelper.cxx.

Variable Documentation

◆ g_last_sl_result

volatile int g_last_sl_result

Definition at line 43 of file CC32xxHelper.cxx.