Fixed some bugs when receiving large data.

This commit is contained in:
t-moe
2015-04-25 14:05:44 +02:00
parent 3d1e4b2ef2
commit 0858b0d2cb
8 changed files with 55 additions and 19 deletions

View File

@@ -856,6 +856,10 @@ int Chirp::realloc(uint32_t min)
min = m_bufSize+CRP_BUFSIZE;
else
min += CRP_BUFSIZE;
if(min==m_bufSize)
return CRP_RES_OK;
uint8_t *newbuf = new (std::nothrow) uint8_t[min];
if (newbuf==NULL)
return CRP_RES_ERROR_MEMORY;

View File

@@ -64,3 +64,8 @@ void ll_system_process() {
void ll_system_delay(uint32_t msec) {
USB_OTG_BSP_mDelay(msec);
}
void ll_system_toggle_led() {
STM_EVAL_LEDToggle(LED6);
}