This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/LAUNCHXL-CC1310: TI drivers

Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: CC1310

Tool/software: TI C/C++ Compiler

I just started with my CC1310-LAUNCHXL and Code Composer Studio.

I'm trying to modify some examples to get used TI's drivers and CCS's enviroment using TI-RTOS.

Delving into source code I noticed that I can't find anywhere the source code of many functions.

For example, in ti/drivers/UART.c I can't find the body of the function "UART_WriteFxn" or "UART_ReadFxn". Neither in UART.h

I scraped out the whole directory of SDK but I wasn't able to find anything.

  • Hello GeT,
    You can refer to this file C:\ti\simplelink_cc13x0_sdk_1_40_00_10\source\ti\drivers\uart\UARTCC26XX.c to see the implementation of the functions mentioned in the function table.
    Regards,
    Prashanth
  • I thought that this file is referred to CC26XX chips, isn't it? Anyhow, the functions I'm looking for, are not seemed to be appeared in that file.
  • UART.c is the generic driver, UARTCC26XX.c contains the chip specific driver. Except for the radio part the CC13xx and CC13xx are equal and since the drivers were first developed for CC26xx they have this name.

    In UART.h this struct is defined:

    typedef struct UART_FxnTable_ {
        /*! Function to close the specified peripheral */
        UART_CloseFxn        closeFxn;
    
        /*! Function to implementation specific control function */
        UART_ControlFxn      controlFxn;
    
        /*! Function to initialize the given data object */
        UART_InitFxn         initFxn;
    
        /*! Function to open the specified peripheral */
        UART_OpenFxn         openFxn;
    
        /*! Function to read from the specified peripheral */
        UART_ReadFxn         readFxn;
    
        /*! Function to read via polling from the specified peripheral */
        UART_ReadPollingFxn  readPollingFxn;
    
        /*! Function to cancel a read from the specified peripheral */
        UART_ReadCancelFxn   readCancelFxn;
    
        /*! Function to write from the specified peripheral */
        UART_WriteFxn        writeFxn;
    
        /*! Function to write via polling from the specified peripheral */
        UART_WritePollingFxn writePollingFxn;
    
        /*! Function to cancel a write from the specified peripheral */
        UART_WriteCancelFxn  writeCancelFxn;
    } UART_FxnTable;

    In CC1310_LAUNCHXL.c:

    const UART_Config UART_config[CC1310_LAUNCHXL_UARTCOUNT] = {
        {
            .fxnTablePtr = &UARTCC26XX_fxnTable,
            .object      = &uartCC26XXObjects[CC1310_LAUNCHXL_UART0],
            .hwAttrs     = &uartCC26XXHWAttrs[CC1310_LAUNCHXL_UART0]
        },
    };

    Then in UART26XX.c:

    const UART_FxnTable UARTCC26XX_fxnTable = {
        UARTCC26XX_close,
        UARTCC26XX_control,
        UARTCC26XX_init,
        UARTCC26XX_open,
        UARTCC26XX_read,
        UARTCC26XX_readPolling,
        UARTCC26XX_readCancel,
        UARTCC26XX_write,
        UARTCC26XX_writePolling,
        UARTCC26XX_writeCancel
    };

    So in the end the write function actually run is UARTCC26XX_write

  • Thank you very much! I hadn't noticed that!