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.

关于CC3200的多线程问题

Other Parts Discussed in Thread: CC3200

想求教下大家关于CC3200通信的多线程问题。

设计需求:想使用CC3200分别与服务端和另一块CC3200开发板之间进行通信,通信方式均为tcp socket,并且可以根据不同的条件选择通信的对象。

背景:了解到tcp套接字有个select函数,但是不是很清楚是用于实现什么功能的。了解到CC3200有osi_TaskCreate函数可以用于创建多线程,但是相关资料比较少。所以,想明确下自己该选择那种方式去设计自己的需求。

谢谢老师

  • /*!
    \brief This function creates a Task.

    Creates a new Task and add it to the last of tasks that are ready to run

    \param pEntry - pointer to the Task Function
    \param pcName - Task Name String
    \param usStackDepth - Stack Size in bytes
    \param pvParameters - pointer to structure to be passed to the Task Function
    \param uxPriority - Task Priority

    \return upon successful creation the function should return 1
    Otherwise, 0 or a negative value indicating the error code shall be returned
    \note
    \warning
    */

    OsiReturnVal_e osi_TaskCreate(P_OSI_TASK_ENTRY pEntry, const signed char * const pcName, unsigned short usStackDepth,
    void *pvParameters, unsigned long uxPriority, OsiTaskHandle *pTaskHandle)

    另外推荐看下tcp socket的例程:processors.wiki.ti.com/.../CC3200_TCP_Socket_Application
  • osi_TaskCreate是带操作系统调用创建线程的,tcp套接字有个select函数这个好像没看到过,至于什么方式设计,没太明白具体什么意思,但是如果选非操作系统实现多个socket,最好设置为非阻塞方式;如果带操作系统的话,就随便了,