Fix sample littlevgl/gui build issues on zephyr platform (#588)
Fix sample littlevgl/guil build issues on zephyr platform, modify code of zephyr platform by adding some macros to control some apis to fit different zephyr version, and align to zephyr-v2.3.0 for sample littlevgl/gui as the latest zephyr version (>=v2.4.0) requires that the thread stack for the thread to create must be defined by macro but not allocating stack memory dynamically. Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
@ -113,7 +113,7 @@ static int send_request(request_t *request, uint16_t msg_type)
|
||||
if ((req_p = pack_request(request, &req_size)) == NULL)
|
||||
return -1;
|
||||
|
||||
/* leanding bytes */
|
||||
/* leading bytes */
|
||||
if (!host_tool_send_data(g_conn_fd, leading, sizeof(leading)))
|
||||
goto ret;
|
||||
|
||||
@ -648,8 +648,8 @@ static bool parse_args(int argc, char *argv[], operation *op)
|
||||
* REPLY_TYPE_EVENT: event(request)
|
||||
* REPLY_TYPE_RESPONSE: response
|
||||
*/
|
||||
static int preocess_reply_data(const char *buf, int len,
|
||||
imrt_link_recv_context_t *ctx)
|
||||
static int process_reply_data(const char *buf, int len,
|
||||
imrt_link_recv_context_t *ctx)
|
||||
{
|
||||
int result = -1;
|
||||
const char *pos = buf;
|
||||
@ -849,7 +849,7 @@ int main(int argc, char *argv[])
|
||||
continue;
|
||||
}
|
||||
|
||||
reply_type = preocess_reply_data((char *) buffer, n, &recv_ctx);
|
||||
reply_type = process_reply_data((char *) buffer, n, &recv_ctx);
|
||||
|
||||
if (reply_type == REPLY_TYPE_RESPONSE) {
|
||||
response_t response[1] = { 0 };
|
||||
|
||||
@ -233,11 +233,6 @@ int on_imrt_link_byte_arrive(unsigned char ch, imrt_link_recv_context_t *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ctx->message.payload_size > 1024 * 1024) {
|
||||
SET_RECV_PHASE(ctx, Phase_Non_Start);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ctx->message.payload = (char *) malloc(ctx->message.payload_size);
|
||||
SET_RECV_PHASE(ctx, Phase_Payload);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user