Changeset 262 for uKadecot/trunk/uip/net/ip/psock.h
- Timestamp:
- Nov 18, 2016, 2:58:30 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uKadecot/trunk/uip/net/ip/psock.h
r158 r262 111 111 uint8_t *readptr; /* Pointer to the next data to be read. */ 112 112 113 char*bufptr; /* Pointer to the buffer used for buffering113 uint8_t *bufptr; /* Pointer to the buffer used for buffering 114 114 incoming data. */ 115 115 … … 124 124 }; 125 125 126 void psock_init(struct psock *psock, char*buffer, unsigned int buffersize);126 void psock_init(struct psock *psock, uint8_t *buffer, unsigned int buffersize); 127 127 /** 128 128 * Initialize a protosocket. … … 135 135 * initialized 136 136 * 137 * \param buffer ( char*) A pointer to the input buffer for the137 * \param buffer (uint8_t *) A pointer to the input buffer for the 138 138 * protosocket. 139 139 * … … 158 158 #define PSOCK_BEGIN(psock) PT_BEGIN(&((psock)->pt)) 159 159 160 PT_THREAD(psock_send(struct psock *psock, const char*buf, unsigned int len));160 PT_THREAD(psock_send(struct psock *psock, const uint8_t *buf, unsigned int len)); 161 161 /** 162 162 * Send data. … … 169 169 * data is to be sent. 170 170 * 171 * \param data ( char*) A pointer to the data that is to be sent.171 * \param data (uint8_t *) A pointer to the data that is to be sent. 172 172 * 173 173 * \param datalen (unsigned int) The length of the data that is to be … … 190 190 */ 191 191 #define PSOCK_SEND_STR(psock, str) \ 192 PT_WAIT_THREAD(&((psock)->pt), psock_send(psock,str, strlen(str)))192 PT_WAIT_THREAD(&((psock)->pt), psock_send(psock, (uint8_t *)str, strlen(str))) 193 193 194 194 PT_THREAD(psock_generator_send(struct psock *psock, … … 257 257 * This macro will block waiting for data and read the data into the 258 258 * input buffer specified with the call to PSOCK_INIT(). Data is only 259 * read until the specifie ed character appears in the data stream.259 * read until the specified character appears in the data stream. 260 260 * 261 261 * \param psock (struct psock *) A pointer to the protosocket from which … … 353 353 PSOCK_BEGIN(s); 354 354 355 PSOCK_WAIT_UNTIL(s, PSOCK_NEW ADATA(s) || timer_expired(t));355 PSOCK_WAIT_UNTIL(s, PSOCK_NEWDATA(s) || timer_expired(t)); 356 356 357 357 if(PSOCK_NEWDATA(s)) { … … 379 379 380 380 /** @} */ 381 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.