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.

RTOS/LAUNCHXL-CC1310: How to use UART_Params's *custom

Part Number: LAUNCHXL-CC1310

Tool/software: TI-RTOS

Dear TIs,

   I add Uart driver to my application,but have some question about UART_Params define. I see there is a param "*custom", but I don't find the the method to use it , pls give me the related material.

Thanks a lot.

  • Hi Sara,

    I'm not sure I understand what you mean by "*custom". Could you elaborate on that?

    Also, what SDK version are you using?
  • 
    

    Hi Edvard,

         Sorry, I didn't give clear inform. SDK version is simplelink_cc13x0_sdk_1_60_00_21. the uart Params is defined in uart.h.

    typedef struct UART_Params_ {
        UART_Mode       readMode;        /*!< Mode for all read calls */
        UART_Mode       writeMode;       /*!< Mode for all write calls */
        uint32_t        readTimeout;     /*!< Timeout for read calls in blocking mode. */
        uint32_t        writeTimeout;    /*!< Timeout for write calls in blocking mode. */
        UART_Callback   readCallback;    /*!< Pointer to read callback function for callback mode. */
        UART_Callback   writeCallback;   /*!< Pointer to write callback function for callback mode. */
        UART_ReturnMode readReturnMode;  /*!< Receive return mode */
        UART_DataMode   readDataMode;    /*!< Type of data being read */
        UART_DataMode   writeDataMode;   /*!< Type of data being written */
        UART_Echo       readEcho;        /*!< Echo received data back */
        uint32_t        baudRate;        /*!< Baud rate for UART */
        UART_LEN        dataLength;      /*!< Data length for UART */
        UART_STOP       stopBits;        /*!< Stop bits for UART */
        UART_PAR        parityType;      /*!< Parity bit type for UART */
        void           *custom;          /*!< Custom argument used by driver implementation */
    } UART_Params;
    

  • It is an unused parameter that the UART driver may or may not take use of in the future. As of now, simply set it to NULL.