annotate chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_func-memcpy.c @ 348:bc7ca94e52e7

STATUS: l1p_driv.obj reconstruction is now perfect
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 30 Oct 2017 17:27:58 +0000
parents 6219bb2f0a52
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
78
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
1 /************* Revision Controle System Header *************
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
2 * GSM Layer 1 software
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
3 * L1_DYN_DWL_FUNC.C
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
4 *
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
5 * Filename l1_dyn_dwl_func.c
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
6 * Copyright 2004 (C) Texas Instruments
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
7 *
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
8 ************* Revision Controle System Header *************/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
9
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
10 #include <stdio.h>
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
11 #include <string.h>
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
12 #include "l1_confg.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
13 #include "l1_types.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
14 #include "l1_const.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
15 #include "l1_signa.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
16 #include "sys_types.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
17
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
18 #if(L1_DYN_DSP_DWNLD == 1)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
19 #include "l1_dyn_dwl_const.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
20 #include "l1_dyn_dwl_proto.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
21 #include "l1_dyn_dwl_defty.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
22 #endif
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
23 #if TESTMODE
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
24 #include "l1tm_defty.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
25 #endif
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
26 #if (AUDIO_TASK == 1)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
27 #include "l1audio_const.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
28 #include "l1audio_cust.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
29 #include "l1audio_defty.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
30 #endif
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
31 #if (L1_GTT == 1)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
32 #include "l1gtt_const.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
33 #include "l1gtt_defty.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
34 #endif
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
35 #if (L1_MP3 == 1)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
36 #include "l1mp3_defty.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
37 #endif //L1_MP3
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
38 #if (L1_MIDI == 1)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
39 #include "l1midi_defty.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
40 #endif
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
41
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
42 #include "l1_defty.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
43 #include "l1_varex.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
44 #include "l1_macro.h"
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
45
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
46 #if (L1_DYN_DSP_DWNLD == 1)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
47 #ifndef NULL
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
48 #define NULL 0
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
49 #endif
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
50
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
51 extern T_DYN_DWNLD_MCU_DSP *dyn_dwl_ndb;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
52 #if (CODE_VERSION == SIMULATION)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
53 extern T_DYN_DWNLD_MCU_DSP dyn_dwl_ndb_sim;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
54 extern UWORD16 dwnld_area_array[SIZE_DWNLD_AREA_SIMU];
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
55 #endif // CODE_VERSION == SIMULATION
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
56
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
57
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
58 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
59 /* l1_initialize_patch_parameters */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
60 /*------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
61 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
62 /* Parameters : */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
63 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
64 /* Return : size of the patch */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
65 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
66 /* Description : Initialize patch parameters and returns the size of the patch*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
67 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
68 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
69 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
70
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
71 UWORD16 l1_initialize_patch_parameters(void)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
72 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
73 UWORD16 patch_size = 0;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
74
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
75 /* Initialize download patch parameters */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
76 l1_apihisr.dyn_dwnld.running_source_pointer = l1a_apihisr_com.dyn_dwnld.copy_parameters.start_MCU_copy_address[l1a_apihisr_com.dyn_dwnld.copy_parameters.num_of_elem-l1_apihisr.dyn_dwnld.patch_ids_counter];
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
77 patch_size = l1a_apihisr_com.dyn_dwnld.copy_parameters.size_array[l1a_apihisr_com.dyn_dwnld.copy_parameters.num_of_elem-l1_apihisr.dyn_dwnld.patch_ids_counter];
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
78 dyn_dwl_ndb->d_api_dwl_crc = 0x0;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
79 return patch_size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
80 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
81
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
82 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
83 /* l1_set_uninstall_parameters */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
84 /*------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
85 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
86 /* Parameters : void */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
87 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
88 /* Return : void */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
89 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
90 /* Description : Set uninstall parameters */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
91 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
92 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
93 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
94
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
95 void l1_set_uninstall_parameters(void)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
96 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
97 /* Set next uninstall adress (pointer incremented) */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
98 dyn_dwl_ndb->d_api_dwl_function_address[0] = (API) (l1a_apihisr_com.dyn_dwnld.uninstall_parameters.address[l1a_apihisr_com.dyn_dwnld.uninstall_parameters.num_of_elem - l1_apihisr.dyn_dwnld.uninstall_counter] & 0x0000FFFF);
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
99 dyn_dwl_ndb->d_api_dwl_function_address[1] = (API) ((l1a_apihisr_com.dyn_dwnld.uninstall_parameters.address[l1a_apihisr_com.dyn_dwnld.uninstall_parameters.num_of_elem - l1_apihisr.dyn_dwnld.uninstall_counter] >> 16) & 0x0000FFFF);
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
100
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
101 /* Set uninstall command */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
102 dyn_dwl_ndb->d_api_dwl_download_ctrl = (API) C_DWL_DOWNLOAD_CTRL_UNINSTALL;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
103 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
104
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
105 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
106 /* l1_initialize_pointers_for_copy */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
107 /*------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
108 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
109 /* Parameters : address of source and destination pointer */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
110 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
111 /* Return : source and destination address modified by reference */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
112 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
113 /* Description : Initialize the pointers for the copy */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
114 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
115 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
116 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
117
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
118 void l1_initialize_pointers_for_copy(UWORD16 **pp_dest_mcu, UWORD16 **pp_src_mcu)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
119 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
120 /* BEGIN: Initialize download area parameters at start download area */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
121 dyn_dwl_ndb->d_api_dwl_write_pointer = l1a_apihisr_com.dyn_dwnld.copy_parameters.start_of_dwnld_area - 1; // correction
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
122
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
123 /* Initialize pointers */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
124 #if (CODE_VERSION == SIMULATION)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
125 *pp_dest_mcu = (UWORD16 *) dwnld_area_array;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
126 #else
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
127 *pp_dest_mcu = (UWORD16 *) API_address_dsp2mcu(l1a_apihisr_com.dyn_dwnld.copy_parameters.start_of_dwnld_area);
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
128 #endif // CODE_VERSION == SIMULATION
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
129
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
130 *pp_src_mcu = (UWORD16 *) l1_apihisr.dyn_dwnld.running_source_pointer;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
131 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
132
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
133 #if 0
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
134 /*--------------------------------------------------------*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
135 /* l1_memcpy_16bit() */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
136 /*--------------------------------------------------------*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
137 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
138 /* Description: */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
139 /* ------------ */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
140 /* This function is equivalemt of memcopy. Thid function */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
141 /* does only 8/16 bit accessed to both source and */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
142 /* destination */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
143 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
144 /* Input parameter: */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
145 /* --------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
146 /* "src" - input pointer */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
147 /* "len" - number of bytes to copy */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
148 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
149 /* Output parameter: */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
150 /* ---------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
151 /* "dst" - output pointer */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
152 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
153 /*--------------------------------------------------------*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
154 void l1_memcpy_16bit(void *dst,void* src,unsigned int len)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
155 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
156 unsigned int i;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
157 unsigned int tempLen;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
158 unsigned char *cdst,*csrc;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
159 unsigned short *ssrc,*sdst;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
160
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
161 cdst=dst;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
162 csrc=src;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
163 sdst=dst;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
164 ssrc=src;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
165
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
166 if(((unsigned int)src&0x01) || ((unsigned int)dst&0x01)){
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
167 // if either source or destination is not 16-bit aligned do the entire memcopy
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
168 // in 8-bit
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
169 for(i=0;i<len;i++){
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
170 *cdst++=*csrc++;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
171 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
172 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
173 else{
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
174 // if both the source and destination are 16-bit aligned do the memcopy
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
175 // in 16-bits
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
176 tempLen = len>>1;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
177 for(i=0;i<tempLen;i++){
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
178 *sdst++ = *ssrc++;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
179 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
180 if(len & 0x1){
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
181 // if the caller wanted to copy odd number of bytes do a last 8-bit copy
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
182 cdst=(unsigned char*)sdst;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
183 csrc=(unsigned char*)ssrc;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
184 *cdst++ = *csrc++;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
185 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
186 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
187 return;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
188 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
189 #endif
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
190
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
191 #define l1_memcpy_16bit memcpy
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
192
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
193 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
194 /* l1_copy_till_the_end_of_the_patch_and_update_write_pointer */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
195 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
196 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
197 /* Parameters : size of the patch, source and destination pointer */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
198 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
199 /* Return : none */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
200 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
201 /* Description : Copy until the end of the patch is reached */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
202 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
203 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
204 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
205
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
206 void l1_copy_till_the_end_of_the_patch_and_update_write_pointer(UWORD16 tmp_patch_size, UWORD16* p_dest_mcu, UWORD16* p_src_mcu)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
207 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
208 while (tmp_patch_size > NUM_WORDS_COPY_API)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
209 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
210 l1_memcpy_16bit(p_dest_mcu,p_src_mcu, NUM_WORDS_COPY_API*sizeof(UWORD16));
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
211 p_dest_mcu += NUM_WORDS_COPY_API;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
212 p_src_mcu += NUM_WORDS_COPY_API;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
213 tmp_patch_size -= NUM_WORDS_COPY_API;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
214 dyn_dwl_ndb->d_api_dwl_write_pointer += NUM_WORDS_COPY_API;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
215 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
216 if (tmp_patch_size != 0)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
217 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
218 l1_memcpy_16bit(p_dest_mcu,p_src_mcu, tmp_patch_size*sizeof(UWORD16));
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
219 dyn_dwl_ndb->d_api_dwl_write_pointer += tmp_patch_size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
220 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
221 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
222
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
223 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
224 /* l1_copy_till_end_of_dwnld_area_and_update_write_pointer */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
225 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
226 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
227 /* Parameters : address of size of the patch, size of download area, */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
228 /* addresses of source pointer, destination pointer */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
229 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
230 /* Return : source pointer and size modified by reference */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
231 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
232 /* Description : Copy until the end of download area is reached */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
233 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
234 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
235 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
236
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
237 void l1_copy_till_end_of_dwnld_area_and_update_write_pointer(UWORD16 tmp_dwnld_area_size,UWORD16 *p_dest_mcu, UWORD16 *p_tmp_patch_size, UWORD16 **pp_src_mcu)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
238 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
239 UWORD16 tmp_patch_size = *p_tmp_patch_size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
240 UWORD16 *p_src_mcu = (UWORD16 *)*pp_src_mcu;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
241
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
242 while (tmp_dwnld_area_size > NUM_WORDS_COPY_API)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
243 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
244 l1_memcpy_16bit(p_dest_mcu,p_src_mcu, NUM_WORDS_COPY_API*sizeof(UWORD16));
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
245 p_dest_mcu += NUM_WORDS_COPY_API;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
246 p_src_mcu += NUM_WORDS_COPY_API;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
247 tmp_patch_size -= NUM_WORDS_COPY_API;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
248 tmp_dwnld_area_size -= NUM_WORDS_COPY_API;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
249 dyn_dwl_ndb->d_api_dwl_write_pointer += NUM_WORDS_COPY_API;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
250 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
251
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
252 if (tmp_dwnld_area_size > 0)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
253 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
254 l1_memcpy_16bit(p_dest_mcu,p_src_mcu, tmp_dwnld_area_size*sizeof(UWORD16));
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
255 p_src_mcu += tmp_dwnld_area_size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
256 tmp_patch_size -= tmp_dwnld_area_size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
257 dyn_dwl_ndb->d_api_dwl_write_pointer += tmp_dwnld_area_size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
258 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
259 *pp_src_mcu = (UWORD16 *) p_src_mcu;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
260 *p_tmp_patch_size = tmp_patch_size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
261 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
262
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
263 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
264 /* l1_copy_first_N_words */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
265 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
266 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
267 /* Parameters : address of size of the patch, address of size of download area,*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
268 /* addresses of source pointer, address of destination pointer */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
269 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
270 /* Return : source and destination pointer modified by reference */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
271 /* size of download area and patch area modified by reference */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
272 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
273 /* Description : Copy the min(N, remaining size of the patch) at the beginning */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
274 /* download area */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
275 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
276 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
277 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
278
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
279 BOOL l1_copy_first_N_words (UWORD16 *dwnld_area_size_p, UWORD16 *patch_area_size_p, UWORD16 **pp_dest_mcu, UWORD16 **pp_src_mcu)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
280 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
281 BOOL return_flag;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
282 UWORD16 num_words_interrupt;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
283 UWORD16 tmp_patch_size = *patch_area_size_p;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
284 UWORD16 tmp_dwnld_area_size = *dwnld_area_size_p;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
285 UWORD16 *p_dest_mcu =(UWORD16 *)*pp_dest_mcu;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
286 UWORD16 *p_src_mcu = (UWORD16 *)*pp_src_mcu;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
287
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
288 /* Copy first N words and generate API interrupt*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
289 if (tmp_patch_size > NUM_WORDS_COPY_API)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
290 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
291 num_words_interrupt = NUM_WORDS_COPY_API;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
292 return_flag = TRUE;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
293 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
294 else
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
295 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
296 num_words_interrupt = tmp_patch_size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
297 return_flag = FALSE;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
298 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
299
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
300 l1_memcpy_16bit(p_dest_mcu,p_src_mcu, num_words_interrupt*sizeof(UWORD16));
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
301
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
302 p_dest_mcu += num_words_interrupt;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
303 p_src_mcu += num_words_interrupt;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
304
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
305 tmp_patch_size -= num_words_interrupt;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
306 tmp_dwnld_area_size -= num_words_interrupt;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
307
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
308 dyn_dwl_ndb->d_api_dwl_write_pointer+=num_words_interrupt;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
309
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
310 *patch_area_size_p = tmp_patch_size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
311 *dwnld_area_size_p = tmp_dwnld_area_size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
312 *pp_dest_mcu = (UWORD16 *)p_dest_mcu;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
313 *pp_src_mcu = (UWORD16 *)p_src_mcu ;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
314
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
315 return return_flag;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
316 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
317
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
318 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
319 /* l1_initialize_download_area_parameters */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
320 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
321 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
322 /* Parameters : none */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
323 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
324 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
325 /* Return : download area size */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
326 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
327 /* Description : Initialize download area: all the parameters */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
328 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
329 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
330 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
331
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
332 UWORD16 l1_initialize_download_area_parameters(void)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
333 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
334 UWORD16 dwnld_area_size = 0;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
335
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
336 /* Set download address and size in API-DSP com */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
337 dyn_dwl_ndb->d_api_dwl_function_address[0] = l1a_apihisr_com.dyn_dwnld.copy_parameters.start_of_dwnld_area;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
338 dyn_dwl_ndb->d_api_dwl_function_address[1] = 0x0;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
339
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
340 #if (CODE_VERSION == SIMULATION)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
341 dyn_dwl_ndb->d_api_dwl_size = SIZE_DWNLD_AREA_SIMU;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
342 #else
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
343 dyn_dwl_ndb->d_api_dwl_size = l1a_apihisr_com.dyn_dwnld.copy_parameters.size_of_dwnld_area;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
344 #endif // CODE_VERSION == SIMULATION
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
345
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
346 dwnld_area_size = l1a_apihisr_com.dyn_dwnld.copy_parameters.size_of_dwnld_area;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
347 return dwnld_area_size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
348 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
349
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
350 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
351 /* l1_init_pointers_and_copy_first_block_of_data */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
352 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
353 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
354 /* Parameters : address of size of the patch, address of size of download area,*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
355 /* addresses of source pointer, address of destination pointer */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
356 /* new patch flag */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
357 /* Return : TRUE if N< size of patch, FALSE otherwise */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
358 /* source and destination pointer modified by reference */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
359 /* size of download area and patch area modified by reference, */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
360 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
361 /* Description : Initialize pointers and starts the copy. */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
362 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
363 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
364 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
365 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
366
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
367 BOOL l1_init_pointers_and_copy_first_block_of_data(UWORD16 *dwnld_area_size_p, UWORD16 *patch_size_p, UWORD16 **pp_dest_mcu, UWORD16 **pp_src_mcu, BOOL new_patch)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
368 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
369 BOOL return_flag;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
370
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
371 /* Initialize download area*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
372 *dwnld_area_size_p = l1_initialize_download_area_parameters();
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
373
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
374 /* In case this is a new patch, initialize patch parameters*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
375 if (new_patch == TRUE)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
376 *patch_size_p = l1_initialize_patch_parameters();
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
377
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
378 /* Initialize pointers for the copy*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
379 l1_initialize_pointers_for_copy(pp_dest_mcu, pp_src_mcu);
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
380
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
381 /* If this is a new patch, the header of the patch must be taken off from the copy*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
382 if (new_patch == TRUE)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
383 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
384 /* Take the initial header off */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
385 *pp_src_mcu= (*pp_src_mcu)+HEADER_PATCH_SIZE;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
386 *patch_size_p= (*patch_size_p)-HEADER_PATCH_SIZE;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
387 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
388
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
389 /* Copy first N words; if remaining size of the patch is smaller than N copy until the end of the patch */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
390 /* In this case, return FALSE as there are no more words to be copied*/
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
391 return_flag = l1_copy_first_N_words (dwnld_area_size_p, patch_size_p, pp_dest_mcu, pp_src_mcu);
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
392
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
393 return return_flag;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
394 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
395
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
396
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
397 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
398 /* l1_set_dyn_dwnld_install_vect */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
399 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
400 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
401 /* Parameters : size vector, destination address vector, crc vector */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
402 /* patch code vector, identifier i of the patch */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
403 /* new patch flag */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
404 /* Return : TRUE operation is successful, FALSE otherwise */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
405 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
406 /* Description : Compute address, size and crc of i-th patch */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
407 /* */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
408 /*---------------------------------------------------------------------------- */
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
409
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
410 BOOL l1_set_dyn_dwnld_install_vect(UWORD16* size_p, UWORD32* dest_addr, UWORD16* crc_vect, const UWORD8 *patch_array_code, UWORD16 i)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
411 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
412 UWORD16 full_size_32_bit, size, size_ext, dsp_addr, dsp_addr_ext, crc_value;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
413 UWORD16 *codePtr;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
414 UWORD16 size_total = 0;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
415 BOOL status_flag = FALSE;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
416 codePtr = (UWORD16 *) patch_array_code;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
417
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
418 if ( (0 == *codePtr++) && (0 == *codePtr++))
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
419 { // NULL TAG detection
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
420 if ( (3 == *codePtr++) && (0 == *codePtr++))
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
421 { // coff2c version number detection
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
422 size = *codePtr++;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
423 size_ext = *codePtr++;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
424
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
425 // first header:4
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
426 size_total+=HEADER_PATCH_SIZE;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
427 while(size != 0 || size_ext != 0)
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
428 {
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
429 full_size_32_bit = (size_ext << 16) + size;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
430 // reconstruction of the total 32-bit size of the section
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
431 size_total+=HEADER_PATCH_SIZE+full_size_32_bit+1;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
432 // Header + size_block + cntrl_word(0xDEAD):1
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
433 codePtr+=full_size_32_bit+2+1;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
434 // Two words for address and one for the cntrl word 0xDEAD
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
435 size = *codePtr++;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
436 size_ext = *codePtr++;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
437 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
438 size_total+=HEADER_PATCH_SIZE;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
439 // Last header to consider
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
440
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
441 dsp_addr = *codePtr++;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
442 dsp_addr_ext = *codePtr++;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
443 crc_value = *codePtr++;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
444 dest_addr[i] = (dsp_addr_ext << 16)+dsp_addr;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
445 crc_vect[i] = crc_value;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
446 size_p[i] = size_total;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
447 status_flag = TRUE;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
448 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
449 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
450 return status_flag;
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
451 }
6219bb2f0a52 l1_dyn_dwl_func.c: memcpy() vs l1_memcpy_16bit() differences analysed
Mychaela Falconia <falcon@ivan.Harhan.ORG>
parents:
diff changeset
452 #endif //L1_DYN_DSP_DWNLD == 1