diff --git a/app/main.c b/app/main.c index 67fda38..efbd119 100644 --- a/app/main.c +++ b/app/main.c @@ -622,7 +622,7 @@ static void MAIN_Key_STAR(bool bKeyPressed, bool bKeyHeld) ) { // start entering a DTMF string gBeepToPlay = BEEP_1KHZ_60MS_OPTIONAL; - memmove(gDTMF_InputBox, gDTMF_String, MIN(sizeof(gDTMF_InputBox), sizeof(gDTMF_String) - 1)); + memcpy(gDTMF_InputBox, gDTMF_String, MIN(sizeof(gDTMF_InputBox), sizeof(gDTMF_String) - 1)); gDTMF_InputBox_Index = 0; gDTMF_InputMode = true; diff --git a/app/menu.c b/app/menu.c index 8e3a723..5afc1d5 100644 --- a/app/menu.c +++ b/app/menu.c @@ -681,7 +681,7 @@ void MENU_AcceptSetting(void) GUI_SelectNextDisplay(DISPLAY_MAIN); gDTMF_InputMode = true; gDTMF_InputBox_Index = 3; - memmove(gDTMF_InputBox, gDTMF_ID, 4); + memcpy(gDTMF_InputBox, gDTMF_ID, 4); gRequestDisplayScreen = DISPLAY_INVALID; } return; @@ -1436,7 +1436,7 @@ static void MENU_Key_MENU(const bool bKeyPressed, const bool bKeyHeld) edit_index = 0; // 'edit_index' is going to be used as the cursor position // make a copy so we can test for change when exiting the menu item - memmove(edit_original, edit, sizeof(edit_original)); + memcpy(edit_original, edit, sizeof(edit_original)); return; } diff --git a/app/uart.c b/app/uart.c index c65f49e..266652f 100644 --- a/app/uart.c +++ b/app/uart.c @@ -487,11 +487,11 @@ bool UART_IsCommandAvailable(void) if (TailIndex < Index) { const uint16_t ChunkSize = sizeof(UART_DMA_Buffer) - Index; - memmove(UART_Command.Buffer, UART_DMA_Buffer + Index, ChunkSize); - memmove(UART_Command.Buffer + ChunkSize, UART_DMA_Buffer, TailIndex); + memcpy(UART_Command.Buffer, UART_DMA_Buffer + Index, ChunkSize); + memcpy(UART_Command.Buffer + ChunkSize, UART_DMA_Buffer, TailIndex); } else - memmove(UART_Command.Buffer, UART_DMA_Buffer + Index, TailIndex - Index); + memcpy(UART_Command.Buffer, UART_DMA_Buffer + Index, TailIndex - Index); TailIndex = DMA_INDEX(TailIndex, 2); if (TailIndex < gUART_WriteIndex) diff --git a/ui/helper.c b/ui/helper.c index 5a0ec69..a9a3cc3 100644 --- a/ui/helper.c +++ b/ui/helper.c @@ -77,8 +77,8 @@ void UI_PrintString(const char *pString, uint8_t Start, uint8_t End, uint8_t Lin if (pString[i] > ' ' && pString[i] < 127) { const unsigned int index = pString[i] - ' ' - 1; - memmove(gFrameBuffer[Line + 0] + ofs, &gFontBig[index][0], 7); - memmove(gFrameBuffer[Line + 1] + ofs, &gFontBig[index][7], 7); + memcpy(gFrameBuffer[Line + 0] + ofs, &gFontBig[index][0], 7); + memcpy(gFrameBuffer[Line + 1] + ofs, &gFontBig[index][7], 7); } } } @@ -102,7 +102,7 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_ { const unsigned int index = (unsigned int)pString[i] - ' ' - 1; if (index < ARRAY_SIZE(gFontSmall)) - memmove(pFb + (i * char_spacing) + 1, &gFontSmall[index], char_width); + memcpy(pFb + (i * char_spacing) + 1, &gFontSmall[index], char_width); } } } @@ -125,7 +125,7 @@ void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_ { const unsigned int index = (unsigned int)pString[i] - ' ' - 1; if (index < ARRAY_SIZE(gFontSmallBold)) - memmove(pFb + (i * char_spacing) + 1, &gFontSmallBold[index], char_width); + memcpy(pFb + (i * char_spacing) + 1, &gFontSmallBold[index], char_width); } } } @@ -142,7 +142,7 @@ void UI_PrintStringSmallBuffer(const char *pString, uint8_t *buffer) { const unsigned int index = (unsigned int)pString[i] - ' ' - 1; if (index < ARRAY_SIZE(gFontSmall)) - memmove(buffer + (i * char_spacing) + 1, &gFontSmall[index], char_width); + memcpy(buffer + (i * char_spacing) + 1, &gFontSmall[index], char_width); } } } diff --git a/ui/main.c b/ui/main.c index 7633f68..a28a58e 100644 --- a/ui/main.c +++ b/ui/main.c @@ -408,14 +408,14 @@ void UI_DisplayMain(void) // highlight the selected/used VFO with a marker if (isMainVFO) - memmove(p_line0 + 0, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default)); + memcpy(p_line0 + 0, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default)); } else // active TX VFO { // highlight the selected/used VFO with a marker if (isMainVFO) - memmove(p_line0 + 0, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default)); + memcpy(p_line0 + 0, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default)); else - memmove(p_line0 + 0, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault)); + memcpy(p_line0 + 0, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault)); } if (gCurrentFunction == FUNCTION_TRANSMIT) @@ -537,14 +537,14 @@ void UI_DisplayMain(void) // show the scan list assigment symbols const ChannelAttributes_t att = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]]; if (att.scanlist1) - memmove(p_line0 + 113, BITMAP_ScanList1, sizeof(BITMAP_ScanList1)); + memcpy(p_line0 + 113, BITMAP_ScanList1, sizeof(BITMAP_ScanList1)); if (att.scanlist2) - memmove(p_line0 + 120, BITMAP_ScanList2, sizeof(BITMAP_ScanList2)); + memcpy(p_line0 + 120, BITMAP_ScanList2, sizeof(BITMAP_ScanList2)); // compander symbol #ifndef ENABLE_BIG_FREQ if (att.compander) - memmove(p_line0 + 120 + LCD_WIDTH, BITMAP_compand, sizeof(BITMAP_compand)); + memcpy(p_line0 + 120 + LCD_WIDTH, BITMAP_compand, sizeof(BITMAP_compand)); #else // TODO: // find somewhere else to put the symbol #endif @@ -624,9 +624,9 @@ void UI_DisplayMain(void) const ChannelAttributes_t att = gMR_ChannelAttributes[gEeprom.ScreenChannel[vfo_num]]; if (att.compander) #ifdef ENABLE_BIG_FREQ - memmove(p_line0 + 120, BITMAP_compand, sizeof(BITMAP_compand)); + memcpy(p_line0 + 120, BITMAP_compand, sizeof(BITMAP_compand)); #else - memmove(p_line0 + 120 + LCD_WIDTH, BITMAP_compand, sizeof(BITMAP_compand)); + memcpy(p_line0 + 120 + LCD_WIDTH, BITMAP_compand, sizeof(BITMAP_compand)); #endif } } diff --git a/ui/menu.c b/ui/menu.c index 2e5b835..327646d 100644 --- a/ui/menu.c +++ b/ui/menu.c @@ -426,7 +426,7 @@ void UI_DisplayMenu(void) // draw the little sub-menu triangle marker if (gIsInSubMenu) - memmove(gFrameBuffer[0] + (8 * menu_list_width) + 1, BITMAP_CurrentIndicator, sizeof(BITMAP_CurrentIndicator)); + memcpy(gFrameBuffer[0] + (8 * menu_list_width) + 1, BITMAP_CurrentIndicator, sizeof(BITMAP_CurrentIndicator)); // draw the menu index number/count sprintf(String, "%2u.%u", 1 + gMenuCursor, gMenuListCount); @@ -778,7 +778,7 @@ void UI_DisplayMenu(void) if (!gIsDtmfContactValid) strcpy(String, "NULL"); else - memmove(String, Contact, 8); + memcpy(String, Contact, 8); break; #endif @@ -962,7 +962,7 @@ void UI_DisplayMenu(void) if (UI_MENU_GetCurrentMenuId() == MENU_D_LIST && gIsDtmfContactValid) { Contact[11] = 0; - memmove(&gDTMF_ID, Contact + 8, 4); + memcpy(&gDTMF_ID, Contact + 8, 4); sprintf(String, "ID:%s", Contact + 8); UI_PrintString(String, menu_item_x1, menu_item_x2, 4, 8); }