diff options
author | xmarvla <vlatko.markovic@seavus.com> | 2011-06-16 14:45:38 +0100 |
---|---|---|
committer | Viktor Mladenovski <viktor.mladenovski@seavus.com> | 2011-08-17 22:10:43 +0200 |
commit | b9b4df06ddb81a6d14354fc0d42e22acf0b4c30c (patch) | |
tree | 48b17930f3f28c72094f090ba38e6761aa43416b /lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c | |
parent | c9d1f9613e3ac18d5dd3b9432646e289bb88cec9 (diff) |
LCM R1T and LCDriver R1N official release.
ST-Ericsson ID: 345044
ST-Ericsson FOSS-OUT ID: STETL-FOSS-OUT-10204
Change-Id: Ib1901abfc2efa6c887c70b8583ddd2258e21aa78
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25187
Tested-by: Vlatko STENKOSKI
Tested-by: Cvetko MLADENOVSKI <cvetko.mladenovski@seavus.com>
Tested-by: Aleksandar GASOSKI <aleksandar.gasoski@seavus.com>
Reviewed-by: Zoran ANCEVSKI <zoran.ancevski@seavus.com>
Reviewed-by: QATEST
Reviewed-by: Vlatko PISTOLOV <vlatko.pistolov@seavus.com>
Conflicts:
lcmodule/win_binaries/LCM.dll
win_binaries/LCDriver_CNH1606432.dll
Diffstat (limited to 'lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c')
-rwxr-xr-x | lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c b/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c index b411027..abb6b58 100755 --- a/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c +++ b/lcmodule/source/cnh1605204_ldr_transport_layer/source/a2_speedflash.c @@ -83,11 +83,15 @@ ErrorCode_e A2_Speedflash_Poll(Communication_t *Communication_p) case A2_SPEEDFLASH_READ_REQ: A2_SPEEDFLASH(Communication_p)->InboundState = A2_SPEEDFLASH_WAIT_READ_REQ; +#ifdef CFG_ENABLE_LOADER_TYPE if (E_SUCCESS != Communication_p->CommunicationDevice_p->Read((void *)A2_SPEEDFLASH(Communication_p)->Scratch, - A2_SPEEDFLASH_REQ_SIZE, A2_Speedflash_ReadCallback, Communication_p)) { + A2_SPEEDFLASH_REQ_SIZE, A2_Speedflash_ReadCallback, Communication_p->CommunicationDevice_p)) { A2_SPEEDFLASH(Communication_p)->InboundState = A2_SPEEDFLASH_READ_REQ; } - +#else + (void)Communication_p->CommunicationDevice_p->Read((void *)A2_SPEEDFLASH(Communication_p)->Scratch, + A2_SPEEDFLASH_REQ_SIZE, A2_Speedflash_ReadCallback, Communication_p->CommunicationDevice_p); +#endif break; case A2_SPEEDFLASH_WAIT_READ_REQ: /* nothing to do */ @@ -98,7 +102,7 @@ ErrorCode_e A2_Speedflash_Poll(Communication_t *Communication_p) A2_SPEEDFLASH(Communication_p)->InboundState = A2_SPEEDFLASH_WAIT_WRITE_BLOCK; if (E_SUCCESS != Communication_p->CommunicationDevice_p->Write(A2_SPEEDFLASH(Communication_p)->Outbound_p, - A2_SPEEDFLASH(Communication_p)->OutboundSize, A2_Speedflash_WriteCallback, Communication_p)) { + A2_SPEEDFLASH(Communication_p)->OutboundSize, A2_Speedflash_WriteCallback, Communication_p->CommunicationDevice_p)) { A2_SPEEDFLASH(Communication_p)->InboundState = A2_SPEEDFLASH_WRITE_BLOCK; } } @@ -114,7 +118,7 @@ ErrorCode_e A2_Speedflash_Poll(Communication_t *Communication_p) void A2_Speedflash_WriteCallback(const void *Data_p, const uint32 Length, void *Param_p) { - Communication_t *Communication_p = (Communication_t *)Param_p; + Communication_t *Communication_p = (Communication_t*)(((CommunicationDevice_t*)Param_p)->Object_p); A2_SPEEDFLASH(Communication_p)->Outbound_p = NULL; A2_SPEEDFLASH(Communication_p)->OutboundSize = 0; @@ -132,7 +136,7 @@ void A2_Speedflash_WriteCallback(const void *Data_p, const uint32 Length, void * void A2_Speedflash_ReadCallback(const void *Data_p, const uint32 Length, void *Param_p) { - Communication_t *Communication_p = (Communication_t *)Param_p; + Communication_t *Communication_p = (Communication_t*)(((CommunicationDevice_t*)Param_p)->Object_p); A2_CommandData_t CmdData; CmdData.Type = A2_SPEEDFLASH_GR; |