ti/python.h
#include <ti/python.h>
TI’s Python models and modules have special OS support functions, but they’re currently poorly understood.
API Documentation
This has something to do with TI Python.
- Authors
- Matt “MateoConLechuga” Waltz - Jacob “jacobly” Young 
Functions
- 
void os_MSDGetMaxLUN(uint8_t *value)
- Perform an MSD GetMaxLUN request, either through the USB port or with an ARM coprocessor. - Parameters
- value – [inout] On input the wValue to use in the request (should be zero for usb?), on output the max logical unit number. 
 
- 
void os_MSDReset(uint8_t value)
- Perform an MSD mass storage reset request, either through the USB port or with an ARM coprocessor. - Parameters
- value – [in] Affects the wValue of the request, 1 for 0x55AA, 2 for 0xAA55, otherwise 0x0000 (for usb). 
 
- 
int8_t os_MSDInquiry(uint8_t lun, uint8_t *inquiry)
- Performs an MSD inquiry, either through the USB port or with an ARM coprocessor. - Parameters
- lun – [in] Logical unit number. 
- inquiry – [out] Buffer where the response is stored. 
 
- Returns
- Error code, 0 for success, 5 for failed command, -5 for failed transfer. 
 
- 
void os_MSDTestUnitReady(uint8_t lun, uint8_t *status)
- Performs an MSD test unit ready command, either through the USB port or with an ARM coprocessor. - Parameters
- lun – [in] Logical unit number. 
- status – [out] Returns the status of the command. 
 
 
- 
int8_t os_MSDReadCapacity(uint8_t lun, uint32_t data[2])
- Performs an MSD read capacity command, either through the USB port or with an ARM coprocessor. - Parameters
- lun – Logical unit number. 
- data – Returns the returned logical block address and block byte length. 
 
- Returns
- Error code, 0 for success, 5 for failed command, -5 for failed transfer. 
 
- 
int8_t os_MSDRead(uint8_t lun, uint8_t blockCount, uint32_t lba, uint24_t blockSize, void *buffer)
- Performs an MSD read command, either through the USB port or with an ARM coprocessor. - Parameters
- lun – [in] Logical unit number. 
- blockCount – [in] Number of blocks to read. 
- lba – [in] Logical block address to start reading from. 
- blockSize – [in] Block size, obtained from os_MSDReadCapacity(). 
- buffer – [out] Buffer to read data into, should be blockCount * blockSize bytes. 
 
- Returns
- Error code, 0 for success, 5 for failed command, -5 for failed transfer. 
 
- 
int8_t os_MSDWrite(uint8_t lun, uint8_t blockCount, uint32_t lba, uint24_t blockSize, void *buffer)
- Performs an MSD write command, either through the USB port or with an ARM coprocessor. - Parameters
- lun – [in] Logical unit number. 
- blockCount – [in] Number of blocks to write. 
- lba – [in] Logical block address to start writing to. 
- blockSize – [in] Block size, obtained from os_MSDReadCapacity(). 
- buffer – [in] Buffer of data to write, should be blockCount * blockSize bytes. 
 
- Returns
- Error code, 0 for success, 5 for failed command, -5 for failed transfer.