Moved size defines to plat_compat

This commit is contained in:
2017-12-25 13:47:50 +01:00
parent 8ded459c68
commit bef9b83826
11 changed files with 90 additions and 55 deletions
+1 -3
View File
@@ -5,13 +5,11 @@
#ifndef GEX_MESSAGES_H
#define GEX_MESSAGES_H
#include "platform.h"
#include "sched_queue.h"
#include "task_sched.h"
#include "TinyFrame.h"
#define BULK_LST_TIMEOUT_MS 200
#define BULKREAD_MAX_CHUNK 512 // this is a static buffer
/**
* Supported message types (TF_TYPE)
*/
+3 -4
View File
@@ -2,17 +2,16 @@
// Created by MightyPork on 2017/12/22.
//
#include "platform.h"
#include "messages.h"
#include "msg_responses.h"
void com_respond_snprintf(TF_ID frame_id, TF_TYPE type, const char *format, ...)
{
#define ERR_STR_LEN 64
char buf[ERR_STR_LEN];
char buf[ERR_MSG_STR_LEN];
va_list args;
va_start(args, format);
uint32_t len = (uint32_t) fixup_vsnprintf(&buf[0], ERR_STR_LEN, format, args);
uint32_t len = (uint32_t) fixup_vsnprintf(&buf[0], ERR_MSG_STR_LEN, format, args);
va_end(args);
com_respond_buf(frame_id, type, (const uint8_t *) buf, len);