Template:CC31xx & CC32xx Radio Tool API

Radio Tool API
The API calls are pretty much identical for CC3100 and CC3200, with the exception of SPI connection, which doesn't require a COM port or baud rate like UART does.

RadioToolOpen (CC3100 SPI)

 * Parameters:
 * Return - 0 if success, and a negative value if failed.

RadioToolOpen (UART)

 * Parameters:
 * {| cellspacing="0" cellpadding="4" style="margin:1em 1em 1em 0; empty-cells:show;"


 * comPort
 * UART COM port
 * baudRate
 * UART baud rate
 * }
 * Return - 0 if success, and a negative value if failed.
 * }
 * Return - 0 if success, and a negative value if failed.

RadioToolClose

 * Parameters:
 * Return - 0 if success, and a negative value if failed.

RadioStartTX

 * Parameters:


 * {| cellspacing="0" cellpadding="4" style="margin:1em 1em 1em 0; empty-cells:show;"


 * eTxMode
 * TX Mode enumerator, see the struct type below
 * powerLevel_Tone
 * Power Level enumerator, see the struct type below
 * eChannel
 * Channel enumerator, see the struct type below
 * eRate
 * Rate enumerator, see the struct type below
 * ePreamble
 * Preamble enumerator, see the struct type below
 * eDataPattern
 * Data Pattern enumerator, see the struct type below
 * size 
 * TX packet size, 1400 bytes maximum
 * delay_amount
 * delay time in microsecond (mSec), minimum of 50 mSec
 * overrideCCA 
 * Yes or No
 * pDstMac 
 * Destination MAC address
 * }
 * Return - 0 if success, and a negative value if failed.
 * delay time in microsecond (mSec), minimum of 50 mSec
 * overrideCCA 
 * Yes or No
 * pDstMac 
 * Destination MAC address
 * }
 * Return - 0 if success, and a negative value if failed.
 * }
 * Return - 0 if success, and a negative value if failed.

RadioStopTX

 * Parameters:
 * {| cellspacing="0" cellpadding="4" style="margin:1em 1em 1em 0; empty-cells:show;"


 * eTxMode
 * TX Mode enumerator, see the struct type below
 * }
 * Return - 0 if success, and a negative value if failed.
 * Return - 0 if success, and a negative value if failed.

RadioStartRX

 * Parameters:
 * {| cellspacing="0" cellpadding="4" style="margin:1em 1em 1em 0; empty-cells:show;"


 * eChannel
 * Channel enumerator, see the struct type below
 * }
 * Return - 0 if success, and a negative value if failed.
 * Return - 0 if success, and a negative value if failed.

RadioStopRX

 * Parameters:
 * Return - 0 if success, and a negative value if failed.

RadioGetStats

 * Parameters:
 * Return - 0 if success, and a negative value if failed.

RadioGetMacAddr

 * Parameters:
 * {| cellspacing="0" cellpadding="4" style="margin:1em 1em 1em 0; empty-cells:show;"


 * pMacAddress
 * The MAC address read from the device. MAC address is searched in the NVMEM first and if not exists, in the EFUSE.
 * }
 * Return - 0 if success, and a negative value if failed.
 * Return - 0 if success, and a negative value if failed.

RadioGetDeviceVersion

 * Parameters:
 * {| cellspacing="0" cellpadding="4" style="margin:1em 1em 1em 0; empty-cells:show;"

46 bytes long. In CC3200, the last two padding bytes indicate on-board application version.
 * pDevVersion
 * The device version. The version includes NWP/MAC/PHY versions, chip ID and ROM version. All can be found under DeviceVersion_s (in Data Structures section).
 * The device version. The version includes NWP/MAC/PHY versions, chip ID and ROM version. All can be found under DeviceVersion_s (in Data Structures section).
 * }
 * Return - 0 if success, and a negative value if failed.

Type definition
The following definitions are used in the PC-based library functions.

Primitive types

 * INT8: signed 8-bit integer
 * INT16: signed 16-bit integer
 * INT32: signed 32-bit integer
 * UINT8 : unsigned 8-bit integer
 * UINT16: unsigned 16-bit integer
 * UINT32: unsigned 32-bit integer

Struct types

 * TX Mode enumerator

The Max power level is 0. The lowest power level is 15
 * Power Level enumerator


 * Channel enumerator


 * Rate enumerator


 * Preamble enumerator


 * Data Pattern enumerator

Note: Chip IDs and corresponding names:
 * Device version structure