; generated by Component: ARM Compiler 5.05 update 2 (build 169) Tool: ArmCC [4d0f38]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave -o..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\mico_platform_common.o --asm_dir=..\..\..\..\Build\demo\MICO-Fire_F429\list_RVMDK\ --list_dir=..\..\..\..\Build\demo\MICO-Fire_F429\list_RVMDK\ --depend=..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\mico_platform_common.d --cpu=Cortex-M4.fp --apcs=interwork -O0 --diag_suppress=9931,1,1293 -I..\..\..\..\Board\fire_F429 -I..\..\..\..\Demos\fire\ov2640 -I..\..\..\..\include -I..\..\..\..\libraries\utilities -I..\..\..\..\libraries\utilities\json_c -I..\..\..\..\MICO\core -I..\..\..\..\MICO\security -I..\..\..\..\MICO\system -I..\..\..\..\MICO\system\command_console -I..\..\..\..\Platform\include -I..\..\..\..\Platform\Cortex-M4 -I..\..\..\..\Platform\Cortex-M4\CMSIS -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals\Libraries\STM32F4xx_StdPeriph_Driver\inc -I..\..\..\..\Platform\MCU\STM32F4xx\peripherals\Libraries -I..\..\..\..\Platform\MCU\STM32F4xx\wlan_bus_driver -I..\..\..\..\Platform\Drivers\spi_flash -I..\..\..\..\Platform\Drivers -I..\..\..\..\libraries\daemons\homekit_server -I..\..\..\..\libraries\daemons\http_server -I..\..\..\..\Platform\Drivers\malloc -I..\..\..\..\Platform\Drivers\SDRAM -I..\..\..\..\Platform\Drivers\ov5640 -IG:\GIT_OSC\STM32_develop\F429-V2\develop\6-WIFI\STM32-WiFi\3.wifi_ov5640\Projects\STM32F429\demo\RVMDK\RTE -IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0\Drivers\CMSIS\Device\ST\STM32F4xx\Include -IC:\Keil_v5\ARM\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32F4xx_DFP\2.5.0 -D__UVISION_VERSION=515 -DSTM32F429xx -DUSE_STDPERIPH_DRIVER -DDEBUG -DHSE_VALUE=25000000 -DOV5640 --omf_browse=..\..\..\..\build\demo\mico-fire_f429\obj_rvmdk\mico_platform_common.crf ..\..\..\..\Platform\MCU\mico_platform_common.c]
                          THUMB

                          AREA ||i.MicoAdcFinalize||, CODE, READONLY, ALIGN=2

                  MicoAdcFinalize PROC
;;;139    
;;;140    OSStatus  MicoAdcFinalize( mico_adc_t adc )
000000  b510              PUSH     {r4,lr}
;;;141    {
000002  4604              MOV      r4,r0
;;;142      if ( adc >= MICO_ADC_NONE )
000004  2c03              CMP      r4,#3
000006  db01              BLT      |L1.12|
;;;143        return kUnsupportedErr;
000008  4804              LDR      r0,|L1.28|
                  |L1.10|
;;;144      return (OSStatus) platform_adc_deinit( &platform_adc_peripherals[adc] );
;;;145    }
00000a  bd10              POP      {r4,pc}
                  |L1.12|
00000c  eb040184          ADD      r1,r4,r4,LSL #2       ;144
000010  4a03              LDR      r2,|L1.32|
000012  eb020081          ADD      r0,r2,r1,LSL #2       ;144
000016  f7fffffe          BL       platform_adc_deinit
00001a  e7f6              B        |L1.10|
;;;146    
                          ENDP

                  |L1.28|
                          DCD      0xffffe5b1
                  |L1.32|
                          DCD      platform_adc_peripherals

                          AREA ||i.MicoAdcInitialize||, CODE, READONLY, ALIGN=2

                  MicoAdcInitialize PROC
;;;132    
;;;133    OSStatus MicoAdcInitialize( mico_adc_t adc, uint32_t sampling_cycle )
000000  b570              PUSH     {r4-r6,lr}
;;;134    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;135      if ( adc >= MICO_ADC_NONE )
000006  2c03              CMP      r4,#3
000008  db01              BLT      |L2.14|
;;;136        return kUnsupportedErr;
00000a  4805              LDR      r0,|L2.32|
                  |L2.12|
;;;137      return (OSStatus) platform_adc_init( &platform_adc_peripherals[adc], sampling_cycle );
;;;138    }
00000c  bd70              POP      {r4-r6,pc}
                  |L2.14|
00000e  eb040184          ADD      r1,r4,r4,LSL #2       ;137
000012  4a04              LDR      r2,|L2.36|
000014  eb020081          ADD      r0,r2,r1,LSL #2       ;137
000018  4629              MOV      r1,r5                 ;137
00001a  f7fffffe          BL       platform_adc_init
00001e  e7f5              B        |L2.12|
;;;139    
                          ENDP

                  |L2.32|
                          DCD      0xffffe5b1
                  |L2.36|
                          DCD      platform_adc_peripherals

                          AREA ||i.MicoAdcTakeSample||, CODE, READONLY, ALIGN=2

                  MicoAdcTakeSample PROC
;;;146    
;;;147    OSStatus MicoAdcTakeSample( mico_adc_t adc, uint16_t* output )
000000  b570              PUSH     {r4-r6,lr}
;;;148    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;149      if ( adc >= MICO_ADC_NONE )
000006  2c03              CMP      r4,#3
000008  db01              BLT      |L3.14|
;;;150        return kUnsupportedErr;
00000a  4805              LDR      r0,|L3.32|
                  |L3.12|
;;;151      return (OSStatus) platform_adc_take_sample( &platform_adc_peripherals[adc], output );
;;;152    }
00000c  bd70              POP      {r4-r6,pc}
                  |L3.14|
00000e  eb040184          ADD      r1,r4,r4,LSL #2       ;151
000012  4a04              LDR      r2,|L3.36|
000014  eb020081          ADD      r0,r2,r1,LSL #2       ;151
000018  4629              MOV      r1,r5                 ;151
00001a  f7fffffe          BL       platform_adc_take_sample
00001e  e7f5              B        |L3.12|
;;;153    
                          ENDP

                  |L3.32|
                          DCD      0xffffe5b1
                  |L3.36|
                          DCD      platform_adc_peripherals

                          AREA ||i.MicoAdcTakeSampleStreram||, CODE, READONLY, ALIGN=2

                  MicoAdcTakeSampleStreram PROC
;;;153    
;;;154    OSStatus MicoAdcTakeSampleStreram( mico_adc_t adc, void* buffer, uint16_t buffer_length )
000000  b570              PUSH     {r4-r6,lr}
;;;155    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
000006  4616              MOV      r6,r2
;;;156      if ( adc >= MICO_ADC_NONE )
000008  2c03              CMP      r4,#3
00000a  db01              BLT      |L4.16|
;;;157        return kUnsupportedErr;
00000c  4805              LDR      r0,|L4.36|
                  |L4.14|
;;;158      return (OSStatus) platform_adc_take_sample_stream( &platform_adc_peripherals[adc], buffer, buffer_length );
;;;159    }
00000e  bd70              POP      {r4-r6,pc}
                  |L4.16|
000010  eb040184          ADD      r1,r4,r4,LSL #2       ;158
000014  4a04              LDR      r2,|L4.40|
000016  eb020081          ADD      r0,r2,r1,LSL #2       ;158
00001a  4632              MOV      r2,r6                 ;158
00001c  4629              MOV      r1,r5                 ;158
00001e  f7fffffe          BL       platform_adc_take_sample_stream
000022  e7f4              B        |L4.14|
;;;160    
                          ENDP

                  |L4.36|
                          DCD      0xffffe5b1
                  |L4.40|
                          DCD      platform_adc_peripherals

                          AREA ||i.MicoFlashEnableSecurity||, CODE, READONLY, ALIGN=2

                  MicoFlashEnableSecurity PROC
;;;672    
;;;673    OSStatus MicoFlashEnableSecurity( mico_partition_t partition, uint32_t off_set, uint32_t size )
000000  e92d47f0          PUSH     {r4-r10,lr}
;;;674    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
;;;675      OSStatus err = kNoErr;
00000a  2700              MOVS     r7,#0
;;;676      uint32_t start_addr = mico_partitions[ partition ].partition_start_addr + off_set;
00000c  eb040084          ADD      r0,r4,r4,LSL #2
000010  4943              LDR      r1,|L5.288|
000012  eb010080          ADD      r0,r1,r0,LSL #2
000016  6880              LDR      r0,[r0,#8]
000018  eb000805          ADD      r8,r0,r5
;;;677      uint32_t end_addr = mico_partitions[ partition ].partition_start_addr + off_set + size - 1;
00001c  eb040084          ADD      r0,r4,r4,LSL #2
000020  eb010080          ADD      r0,r1,r0,LSL #2
000024  6880              LDR      r0,[r0,#8]
000026  4428              ADD      r0,r0,r5
000028  4430              ADD      r0,r0,r6
00002a  f1a00901          SUB      r9,r0,#1
;;;678    
;;;679      if (size == 0)
00002e  b906              CBNZ     r6,|L5.50|
;;;680        goto exit;
000030  e072              B        |L5.280|
                  |L5.50|
;;;681      require_action_quiet( partition > MICO_PARTITION_ERROR, exit, err = kParamErr );
000032  bf00              NOP      
000034  2c00              CMP      r4,#0
000036  da01              BGE      |L5.60|
000038  4f3a              LDR      r7,|L5.292|
00003a  e06d              B        |L5.280|
                  |L5.60|
00003c  bf00              NOP      
;;;682      require_action_quiet( partition < MICO_PARTITION_MAX, exit, err = kParamErr );
00003e  bf00              NOP      
000040  2c07              CMP      r4,#7
000042  db01              BLT      |L5.72|
000044  4f37              LDR      r7,|L5.292|
000046  e067              B        |L5.280|
                  |L5.72|
000048  bf00              NOP      
;;;683    
;;;684      require_action_quiet( mico_partitions[ partition ].partition_owner != MICO_FLASH_NONE, exit, err = kNotFoundErr );
00004a  bf00              NOP      
00004c  eb040084          ADD      r0,r4,r4,LSL #2
000050  4933              LDR      r1,|L5.288|
000052  f8110020          LDRB     r0,[r1,r0,LSL #2]
000056  2803              CMP      r0,#3
000058  d102              BNE      |L5.96|
00005a  4f32              LDR      r7,|L5.292|
00005c  3f16              SUBS     r7,r7,#0x16
00005e  e05b              B        |L5.280|
                  |L5.96|
000060  bf00              NOP      
;;;685      require_action_quiet( start_addr >= mico_partitions[ partition ].partition_start_addr, exit, err = kParamErr );
000062  bf00              NOP      
000064  eb040084          ADD      r0,r4,r4,LSL #2
000068  492d              LDR      r1,|L5.288|
00006a  eb010080          ADD      r0,r1,r0,LSL #2
00006e  6880              LDR      r0,[r0,#8]
000070  4540              CMP      r0,r8
000072  d901              BLS      |L5.120|
000074  4f2b              LDR      r7,|L5.292|
000076  e04f              B        |L5.280|
                  |L5.120|
000078  bf00              NOP      
;;;686      require_action_quiet( end_addr < mico_partitions[ partition ].partition_start_addr + mico_partitions[ partition ].partition_length, exit, err = kParamErr );
00007a  bf00              NOP      
00007c  eb040084          ADD      r0,r4,r4,LSL #2
000080  4927              LDR      r1,|L5.288|
000082  eb010080          ADD      r0,r1,r0,LSL #2
000086  6880              LDR      r0,[r0,#8]
000088  eb040184          ADD      r1,r4,r4,LSL #2
00008c  4a24              LDR      r2,|L5.288|
00008e  eb020181          ADD      r1,r2,r1,LSL #2
000092  68c9              LDR      r1,[r1,#0xc]
000094  4408              ADD      r0,r0,r1
000096  4548              CMP      r0,r9
000098  d801              BHI      |L5.158|
00009a  4f22              LDR      r7,|L5.292|
00009c  e03c              B        |L5.280|
                  |L5.158|
00009e  bf00              NOP      
;;;687    
;;;688      if( platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].initialized == false )
0000a0  eb040084          ADD      r0,r4,r4,LSL #2
0000a4  491e              LDR      r1,|L5.288|
0000a6  f8110020          LDRB     r0,[r1,r0,LSL #2]
0000aa  eb000040          ADD      r0,r0,r0,LSL #1
0000ae  491e              LDR      r1,|L5.296|
0000b0  eb010080          ADD      r0,r1,r0,LSL #2
0000b4  7a00              LDRB     r0,[r0,#8]
0000b6  b938              CBNZ     r0,|L5.200|
;;;689      {
;;;690        err =  MicoFlashInitialize( partition );
0000b8  4620              MOV      r0,r4
0000ba  f7fffffe          BL       MicoFlashInitialize
0000be  4607              MOV      r7,r0
;;;691        require_noerr_quiet( err, exit );
0000c0  bf00              NOP      
0000c2  b107              CBZ      r7,|L5.198|
0000c4  e028              B        |L5.280|
                  |L5.198|
0000c6  bf00              NOP      
                  |L5.200|
;;;692      }
;;;693    
;;;694      mico_rtos_lock_mutex( &platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex );
0000c8  eb040184          ADD      r1,r4,r4,LSL #2
0000cc  4a14              LDR      r2,|L5.288|
0000ce  f8121021          LDRB     r1,[r2,r1,LSL #2]
0000d2  eb010141          ADD      r1,r1,r1,LSL #1
0000d6  4a14              LDR      r2,|L5.296|
0000d8  eb020181          ADD      r1,r2,r1,LSL #2
0000dc  1d08              ADDS     r0,r1,#4
0000de  f7fffffe          BL       mico_rtos_lock_mutex
;;;695      err = platform_flash_enable_protect( &platform_flash_peripherals[ mico_partitions[ partition ].partition_owner ], start_addr, end_addr);
0000e2  eb040184          ADD      r1,r4,r4,LSL #2
0000e6  4a0e              LDR      r2,|L5.288|
0000e8  f8121021          LDRB     r1,[r2,r1,LSL #2]
0000ec  4a0f              LDR      r2,|L5.300|
0000ee  eb021001          ADD      r0,r2,r1,LSL #4
0000f2  464a              MOV      r2,r9
0000f4  4641              MOV      r1,r8
0000f6  f7fffffe          BL       platform_flash_enable_protect
0000fa  4607              MOV      r7,r0
;;;696      mico_rtos_unlock_mutex( &platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex );
0000fc  eb040184          ADD      r1,r4,r4,LSL #2
000100  4a07              LDR      r2,|L5.288|
000102  f8121021          LDRB     r1,[r2,r1,LSL #2]
000106  eb010141          ADD      r1,r1,r1,LSL #1
00010a  4a07              LDR      r2,|L5.296|
00010c  eb020181          ADD      r1,r2,r1,LSL #2
000110  1d08              ADDS     r0,r1,#4
000112  f7fffffe          BL       mico_rtos_unlock_mutex
;;;697      
;;;698    exit:
000116  bf00              NOP      
                  |L5.280|
;;;699      return err;
000118  4638              MOV      r0,r7
;;;700    }
00011a  e8bd87f0          POP      {r4-r10,pc}
;;;701    
                          ENDP

00011e  0000              DCW      0x0000
                  |L5.288|
                          DCD      mico_partitions
                  |L5.292|
                          DCD      0xffffe5cf
                  |L5.296|
                          DCD      platform_flash_drivers
                  |L5.300|
                          DCD      platform_flash_peripherals

                          AREA ||i.MicoFlashErase||, CODE, READONLY, ALIGN=2

                  MicoFlashErase PROC
;;;571    
;;;572    OSStatus MicoFlashErase(mico_partition_t partition, uint32_t off_set, uint32_t size)
000000  e92d47f0          PUSH     {r4-r10,lr}
;;;573    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
;;;574      OSStatus err = kNoErr;
00000a  2700              MOVS     r7,#0
;;;575      uint32_t start_addr = mico_partitions[ partition ].partition_start_addr + off_set;
00000c  eb040084          ADD      r0,r4,r4,LSL #2
000010  494a              LDR      r1,|L6.316|
000012  eb010080          ADD      r0,r1,r0,LSL #2
000016  6880              LDR      r0,[r0,#8]
000018  eb000805          ADD      r8,r0,r5
;;;576      uint32_t end_addr = mico_partitions[ partition ].partition_start_addr + off_set + size - 1;
00001c  eb040084          ADD      r0,r4,r4,LSL #2
000020  eb010080          ADD      r0,r1,r0,LSL #2
000024  6880              LDR      r0,[r0,#8]
000026  4428              ADD      r0,r0,r5
000028  4430              ADD      r0,r0,r6
00002a  f1a00901          SUB      r9,r0,#1
;;;577    
;;;578      if (size == 0)
00002e  b906              CBNZ     r6,|L6.50|
;;;579        goto exit;
000030  e081              B        |L6.310|
                  |L6.50|
;;;580      require_action_quiet( partition > MICO_PARTITION_ERROR, exit, err = kParamErr );
000032  bf00              NOP      
000034  2c00              CMP      r4,#0
000036  da01              BGE      |L6.60|
000038  4f41              LDR      r7,|L6.320|
00003a  e07c              B        |L6.310|
                  |L6.60|
00003c  bf00              NOP      
;;;581      require_action_quiet( partition < MICO_PARTITION_MAX, exit, err = kParamErr );  
00003e  bf00              NOP      
000040  2c07              CMP      r4,#7
000042  db01              BLT      |L6.72|
000044  4f3e              LDR      r7,|L6.320|
000046  e076              B        |L6.310|
                  |L6.72|
000048  bf00              NOP      
;;;582    
;;;583      require_action_quiet( mico_partitions[ partition ].partition_owner != MICO_FLASH_NONE, exit, err = kNotFoundErr );
00004a  bf00              NOP      
00004c  eb040084          ADD      r0,r4,r4,LSL #2
000050  493a              LDR      r1,|L6.316|
000052  f8110020          LDRB     r0,[r1,r0,LSL #2]
000056  2803              CMP      r0,#3
000058  d102              BNE      |L6.96|
00005a  4f39              LDR      r7,|L6.320|
00005c  3f16              SUBS     r7,r7,#0x16
00005e  e06a              B        |L6.310|
                  |L6.96|
000060  bf00              NOP      
;;;584    #ifndef BOOTLOADER
;;;585      require_action_quiet( ( mico_partitions[ partition ].partition_options & PAR_OPT_WRITE_MASK ) == PAR_OPT_WRITE_EN, exit, err = kPermissionErr );
000062  bf00              NOP      
000064  eb040084          ADD      r0,r4,r4,LSL #2
000068  4934              LDR      r1,|L6.316|
00006a  eb010080          ADD      r0,r1,r0,LSL #2
00006e  7c00              LDRB     r0,[r0,#0x10]
000070  f0000002          AND      r0,r0,#2
000074  2802              CMP      r0,#2
000076  d002              BEQ      |L6.126|
000078  4f31              LDR      r7,|L6.320|
00007a  3f44              SUBS     r7,r7,#0x44
00007c  e05b              B        |L6.310|
                  |L6.126|
00007e  bf00              NOP      
;;;586    #endif
;;;587    
;;;588      require_action_quiet( start_addr >= mico_partitions[ partition ].partition_start_addr, exit, err = kParamErr );
000080  bf00              NOP      
000082  eb040084          ADD      r0,r4,r4,LSL #2
000086  492d              LDR      r1,|L6.316|
000088  eb010080          ADD      r0,r1,r0,LSL #2
00008c  6880              LDR      r0,[r0,#8]
00008e  4540              CMP      r0,r8
000090  d901              BLS      |L6.150|
000092  4f2b              LDR      r7,|L6.320|
000094  e04f              B        |L6.310|
                  |L6.150|
000096  bf00              NOP      
;;;589      require_action_quiet( end_addr < mico_partitions[ partition ].partition_start_addr + mico_partitions[ partition ].partition_length, exit, err = kParamErr );
000098  bf00              NOP      
00009a  eb040084          ADD      r0,r4,r4,LSL #2
00009e  4927              LDR      r1,|L6.316|
0000a0  eb010080          ADD      r0,r1,r0,LSL #2
0000a4  6880              LDR      r0,[r0,#8]
0000a6  eb040184          ADD      r1,r4,r4,LSL #2
0000aa  4a24              LDR      r2,|L6.316|
0000ac  eb020181          ADD      r1,r2,r1,LSL #2
0000b0  68c9              LDR      r1,[r1,#0xc]
0000b2  4408              ADD      r0,r0,r1
0000b4  4548              CMP      r0,r9
0000b6  d801              BHI      |L6.188|
0000b8  4f21              LDR      r7,|L6.320|
0000ba  e03c              B        |L6.310|
                  |L6.188|
0000bc  bf00              NOP      
;;;590    
;;;591      if( platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].initialized == false )
0000be  eb040084          ADD      r0,r4,r4,LSL #2
0000c2  491e              LDR      r1,|L6.316|
0000c4  f8110020          LDRB     r0,[r1,r0,LSL #2]
0000c8  eb000040          ADD      r0,r0,r0,LSL #1
0000cc  491d              LDR      r1,|L6.324|
0000ce  eb010080          ADD      r0,r1,r0,LSL #2
0000d2  7a00              LDRB     r0,[r0,#8]
0000d4  b938              CBNZ     r0,|L6.230|
;;;592      {
;;;593        err =  MicoFlashInitialize( partition );
0000d6  4620              MOV      r0,r4
0000d8  f7fffffe          BL       MicoFlashInitialize
0000dc  4607              MOV      r7,r0
;;;594        require_noerr_quiet( err, exit );
0000de  bf00              NOP      
0000e0  b107              CBZ      r7,|L6.228|
0000e2  e028              B        |L6.310|
                  |L6.228|
0000e4  bf00              NOP      
                  |L6.230|
;;;595      }
;;;596    
;;;597      mico_rtos_lock_mutex( &platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex );
0000e6  eb040184          ADD      r1,r4,r4,LSL #2
0000ea  4a14              LDR      r2,|L6.316|
0000ec  f8121021          LDRB     r1,[r2,r1,LSL #2]
0000f0  eb010141          ADD      r1,r1,r1,LSL #1
0000f4  4a13              LDR      r2,|L6.324|
0000f6  eb020181          ADD      r1,r2,r1,LSL #2
0000fa  1d08              ADDS     r0,r1,#4
0000fc  f7fffffe          BL       mico_rtos_lock_mutex
;;;598      err = platform_flash_erase( &platform_flash_peripherals[ mico_partitions[ partition ].partition_owner ], start_addr, end_addr );
000100  eb040184          ADD      r1,r4,r4,LSL #2
000104  4a0d              LDR      r2,|L6.316|
000106  f8121021          LDRB     r1,[r2,r1,LSL #2]
00010a  4a0f              LDR      r2,|L6.328|
00010c  eb021001          ADD      r0,r2,r1,LSL #4
000110  464a              MOV      r2,r9
000112  4641              MOV      r1,r8
000114  f7fffffe          BL       platform_flash_erase
000118  4607              MOV      r7,r0
;;;599      mico_rtos_unlock_mutex( &platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex );
00011a  eb040184          ADD      r1,r4,r4,LSL #2
00011e  4a07              LDR      r2,|L6.316|
000120  f8121021          LDRB     r1,[r2,r1,LSL #2]
000124  eb010141          ADD      r1,r1,r1,LSL #1
000128  4a06              LDR      r2,|L6.324|
00012a  eb020181          ADD      r1,r2,r1,LSL #2
00012e  1d08              ADDS     r0,r1,#4
000130  f7fffffe          BL       mico_rtos_unlock_mutex
;;;600    
;;;601    exit:
000134  bf00              NOP      
                  |L6.310|
;;;602      return err;
000136  4638              MOV      r0,r7
;;;603    }
000138  e8bd87f0          POP      {r4-r10,pc}
;;;604    
                          ENDP

                  |L6.316|
                          DCD      mico_partitions
                  |L6.320|
                          DCD      0xffffe5cf
                  |L6.324|
                          DCD      platform_flash_drivers
                  |L6.328|
                          DCD      platform_flash_peripherals

                          AREA ||i.MicoFlashGetInfo||, CODE, READONLY, ALIGN=2

                  MicoFlashGetInfo PROC
;;;538    
;;;539    mico_logic_partition_t* MicoFlashGetInfo( mico_partition_t inPartition )
000000  4601              MOV      r1,r0
;;;540    {
;;;541      if( (inPartition < 0) || (inPartition >= MICO_PARTITION_MAX))
000002  2900              CMP      r1,#0
000004  db01              BLT      |L7.10|
000006  2907              CMP      r1,#7
000008  db01              BLT      |L7.14|
                  |L7.10|
;;;542        return NULL;
00000a  2000              MOVS     r0,#0
                  |L7.12|
;;;543      else
;;;544        return (mico_logic_partition_t *)&mico_partitions[ inPartition ];
;;;545    }
00000c  4770              BX       lr
                  |L7.14|
00000e  eb010081          ADD      r0,r1,r1,LSL #2       ;544
000012  4a02              LDR      r2,|L7.28|
000014  eb020080          ADD      r0,r2,r0,LSL #2       ;544
000018  e7f8              B        |L7.12|
;;;546    
                          ENDP

00001a  0000              DCW      0x0000
                  |L7.28|
                          DCD      mico_partitions

                          AREA ||i.MicoFlashInitialize||, CODE, READONLY, ALIGN=2

                          REQUIRE _printf_pre_padding
                          REQUIRE _printf_percent
                          REQUIRE _printf_widthprec
                          REQUIRE _printf_d
                          REQUIRE _printf_s
                          REQUIRE _printf_int_dec
                          REQUIRE _printf_str
                  MicoFlashInitialize PROC
;;;547    
;;;548    static OSStatus MicoFlashInitialize( mico_partition_t partition )
000000  e92d41fc          PUSH     {r2-r8,lr}
;;;549    {
000004  4604              MOV      r4,r0
;;;550      OSStatus err = kNoErr;
000006  2500              MOVS     r5,#0
;;;551      
;;;552      require_action_quiet( partition > MICO_PARTITION_ERROR, exit, err = kParamErr );
000008  bf00              NOP      
00000a  2c00              CMP      r4,#0
00000c  da01              BGE      |L8.18|
00000e  4d52              LDR      r5,|L8.344|
000010  e09f              B        |L8.338|
                  |L8.18|
000012  bf00              NOP      
;;;553      require_action_quiet( partition < MICO_PARTITION_MAX, exit, err = kParamErr );
000014  bf00              NOP      
000016  2c07              CMP      r4,#7
000018  db01              BLT      |L8.30|
00001a  4d4f              LDR      r5,|L8.344|
00001c  e099              B        |L8.338|
                  |L8.30|
00001e  bf00              NOP      
;;;554      require_action_quiet( mico_partitions[ partition ].partition_owner != MICO_FLASH_NONE, exit, err = kNotFoundErr );
000020  bf00              NOP      
000022  eb040084          ADD      r0,r4,r4,LSL #2
000026  494d              LDR      r1,|L8.348|
000028  f8110020          LDRB     r0,[r1,r0,LSL #2]
00002c  2803              CMP      r0,#3
00002e  d102              BNE      |L8.54|
000030  4d49              LDR      r5,|L8.344|
000032  3d16              SUBS     r5,r5,#0x16
000034  e08d              B        |L8.338|
                  |L8.54|
000036  bf00              NOP      
;;;555      
;;;556      if( platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex == NULL){
000038  eb040084          ADD      r0,r4,r4,LSL #2
00003c  4947              LDR      r1,|L8.348|
00003e  f8110020          LDRB     r0,[r1,r0,LSL #2]
000042  eb000040          ADD      r0,r0,r0,LSL #1
000046  4946              LDR      r1,|L8.352|
000048  eb010080          ADD      r0,r1,r0,LSL #2
00004c  6840              LDR      r0,[r0,#4]
00004e  2800              CMP      r0,#0
000050  d13b              BNE      |L8.202|
;;;557        err = mico_rtos_init_mutex( &platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex );
000052  eb040184          ADD      r1,r4,r4,LSL #2
000056  4a41              LDR      r2,|L8.348|
000058  f8121021          LDRB     r1,[r2,r1,LSL #2]
00005c  eb010141          ADD      r1,r1,r1,LSL #1
000060  4a3f              LDR      r2,|L8.352|
000062  eb020181          ADD      r1,r2,r1,LSL #2
000066  1d08              ADDS     r0,r1,#4
000068  f7fffffe          BL       mico_rtos_init_mutex
00006c  4605              MOV      r5,r0
;;;558        require_noerr( err, exit );
00006e  bf00              NOP      
000070  462e              MOV      r6,r5
000072  2e00              CMP      r6,#0
000074  d028              BEQ      |L8.200|
000076  bf00              NOP      
000078  483a              LDR      r0,|L8.356|
00007a  6800              LDR      r0,[r0,#0]  ; mico_debug_enabled
00007c  b900              CBNZ     r0,|L8.128|
00007e  e021              B        |L8.196|
                  |L8.128|
000080  4839              LDR      r0,|L8.360|
000082  f7fffffe          BL       mico_rtos_lock_mutex
000086  215c              MOVS     r1,#0x5c
000088  a038              ADR      r0,|L8.364|
00008a  f7fffffe          BL       strrchr
00008e  b128              CBZ      r0,|L8.156|
000090  215c              MOVS     r1,#0x5c
000092  a036              ADR      r0,|L8.364|
000094  f7fffffe          BL       strrchr
000098  1c40              ADDS     r0,r0,#1
00009a  e000              B        |L8.158|
                  |L8.156|
00009c  a033              ADR      r0,|L8.364|
                  |L8.158|
00009e  4607              MOV      r7,r0
0000a0  f7fffffe          BL       mico_get_time
0000a4  4680              MOV      r8,r0
0000a6  a03d              ADR      r0,|L8.412|
0000a8  f240212e          MOV      r1,#0x22e
0000ac  4b3c              LDR      r3,|L8.416|
0000ae  463a              MOV      r2,r7
0000b0  e9cd1000          STRD     r1,r0,[sp,#0]
0000b4  4641              MOV      r1,r8
0000b6  a03b              ADR      r0,|L8.420|
0000b8  f7fffffe          BL       __2printf
0000bc  482a              LDR      r0,|L8.360|
0000be  f7fffffe          BL       mico_rtos_unlock_mutex
0000c2  bf00              NOP      
                  |L8.196|
0000c4  bf00              NOP      
0000c6  e044              B        |L8.338|
                  |L8.200|
0000c8  bf00              NOP      
                  |L8.202|
;;;559      }
;;;560      
;;;561      mico_rtos_lock_mutex( &platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex );
0000ca  eb040184          ADD      r1,r4,r4,LSL #2
0000ce  4a23              LDR      r2,|L8.348|
0000d0  f8121021          LDRB     r1,[r2,r1,LSL #2]
0000d4  eb010141          ADD      r1,r1,r1,LSL #1
0000d8  4a21              LDR      r2,|L8.352|
0000da  eb020181          ADD      r1,r2,r1,LSL #2
0000de  1d08              ADDS     r0,r1,#4
0000e0  f7fffffe          BL       mico_rtos_lock_mutex
;;;562      
;;;563      err = platform_flash_init( &platform_flash_peripherals[ mico_partitions[ partition ].partition_owner ] );
0000e4  eb040184          ADD      r1,r4,r4,LSL #2
0000e8  4a1c              LDR      r2,|L8.348|
0000ea  f8121021          LDRB     r1,[r2,r1,LSL #2]
0000ee  4a37              LDR      r2,|L8.460|
0000f0  eb021001          ADD      r0,r2,r1,LSL #4
0000f4  f7fffffe          BL       platform_flash_init
0000f8  4605              MOV      r5,r0
;;;564      platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].peripheral = (platform_flash_t *)&platform_flash_peripherals[ mico_partitions[ partition ].partition_owner ];
0000fa  eb040084          ADD      r0,r4,r4,LSL #2
0000fe  4917              LDR      r1,|L8.348|
000100  f8110020          LDRB     r0,[r1,r0,LSL #2]
000104  4931              LDR      r1,|L8.460|
000106  eb011000          ADD      r0,r1,r0,LSL #4
00010a  eb040184          ADD      r1,r4,r4,LSL #2
00010e  4a13              LDR      r2,|L8.348|
000110  f8121021          LDRB     r1,[r2,r1,LSL #2]
000114  eb010141          ADD      r1,r1,r1,LSL #1
000118  4a11              LDR      r2,|L8.352|
00011a  f8420021          STR      r0,[r2,r1,LSL #2]
;;;565      platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].initialized = true;
00011e  2001              MOVS     r0,#1
000120  eb040184          ADD      r1,r4,r4,LSL #2
000124  4a0d              LDR      r2,|L8.348|
000126  f8121021          LDRB     r1,[r2,r1,LSL #2]
00012a  eb010141          ADD      r1,r1,r1,LSL #1
00012e  4a0c              LDR      r2,|L8.352|
000130  eb020181          ADD      r1,r2,r1,LSL #2
000134  7208              STRB     r0,[r1,#8]
;;;566      mico_rtos_unlock_mutex( &platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex );
000136  eb040184          ADD      r1,r4,r4,LSL #2
00013a  4a08              LDR      r2,|L8.348|
00013c  f8121021          LDRB     r1,[r2,r1,LSL #2]
000140  eb010141          ADD      r1,r1,r1,LSL #1
000144  4a06              LDR      r2,|L8.352|
000146  eb020181          ADD      r1,r2,r1,LSL #2
00014a  1d08              ADDS     r0,r1,#4
00014c  f7fffffe          BL       mico_rtos_unlock_mutex
;;;567      
;;;568    exit: 
000150  bf00              NOP      
                  |L8.338|
;;;569      return err;
000152  4628              MOV      r0,r5
;;;570    }
000154  e8bd81fc          POP      {r2-r8,pc}
;;;571    
                          ENDP

                  |L8.344|
                          DCD      0xffffe5cf
                  |L8.348|
                          DCD      mico_partitions
                  |L8.352|
                          DCD      platform_flash_drivers
                  |L8.356|
                          DCD      mico_debug_enabled
                  |L8.360|
                          DCD      stdio_tx_mutex
                  |L8.364|
00016c  2e2e5c2e          DCB      "..\\..\\..\\..\\Platform\\MCU\\mico_platform_common.c",0
000170  2e5c2e2e
000174  5c2e2e5c
000178  506c6174
00017c  666f726d
000180  5c4d4355
000184  5c6d6963
000188  6f5f706c
00018c  6174666f
000190  726d5f63
000194  6f6d6d6f
000198  6e2e6300
                  |L8.412|
00019c  00                DCB      0
00019d  00                DCB      0
00019e  00                DCB      0
00019f  00                DCB      0
                  |L8.416|
                          DCD      __PRETTY_FUNCTION__
                  |L8.420|
0001a4  5b25645d          DCB      "[%d][MICO:%s:%s:%4d] **ASSERT** %s\r\n",0
0001a8  5b4d4943
0001ac  4f3a2573
0001b0  3a25733a
0001b4  2534645d
0001b8  202a2a41
0001bc  53534552
0001c0  542a2a20
0001c4  25730d0a
0001c8  00      
0001c9  00                DCB      0
0001ca  00                DCB      0
0001cb  00                DCB      0
                  |L8.460|
                          DCD      platform_flash_peripherals

                          AREA ||i.MicoFlashRead||, CODE, READONLY, ALIGN=2

                  MicoFlashRead PROC
;;;638    
;;;639    OSStatus MicoFlashRead( mico_partition_t partition, volatile uint32_t* off_set, uint8_t* outBuffer ,uint32_t inBufferLength)
000000  e92d43f8          PUSH     {r3-r9,lr}
;;;640    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4690              MOV      r8,r2
00000a  461e              MOV      r6,r3
;;;641      OSStatus err = kNoErr;
00000c  2700              MOVS     r7,#0
;;;642      uint32_t start_addr = mico_partitions[ partition ].partition_start_addr + *off_set;
00000e  eb040084          ADD      r0,r4,r4,LSL #2
000012  4951              LDR      r1,|L9.344|
000014  eb010080          ADD      r0,r1,r0,LSL #2
000018  6880              LDR      r0,[r0,#8]
00001a  6829              LDR      r1,[r5,#0]
00001c  4408              ADD      r0,r0,r1
00001e  9000              STR      r0,[sp,#0]
;;;643      uint32_t  end_addr = mico_partitions[ partition ].partition_start_addr + *off_set + inBufferLength - 1;
000020  eb040084          ADD      r0,r4,r4,LSL #2
000024  494c              LDR      r1,|L9.344|
000026  eb010080          ADD      r0,r1,r0,LSL #2
00002a  6880              LDR      r0,[r0,#8]
00002c  6829              LDR      r1,[r5,#0]
00002e  4408              ADD      r0,r0,r1
000030  4430              ADD      r0,r0,r6
000032  f1a00901          SUB      r9,r0,#1
;;;644    
;;;645      if (inBufferLength == 0)
000036  b906              CBNZ     r6,|L9.58|
;;;646        goto exit;
000038  e08b              B        |L9.338|
                  |L9.58|
;;;647      require_action_quiet( partition > MICO_PARTITION_ERROR, exit, err = kParamErr );
00003a  bf00              NOP      
00003c  2c00              CMP      r4,#0
00003e  da01              BGE      |L9.68|
000040  4f46              LDR      r7,|L9.348|
000042  e086              B        |L9.338|
                  |L9.68|
000044  bf00              NOP      
;;;648      require_action_quiet( partition < MICO_PARTITION_MAX, exit, err = kParamErr );
000046  bf00              NOP      
000048  2c07              CMP      r4,#7
00004a  db01              BLT      |L9.80|
00004c  4f43              LDR      r7,|L9.348|
00004e  e080              B        |L9.338|
                  |L9.80|
000050  bf00              NOP      
;;;649      
;;;650      require_action_quiet( mico_partitions[ partition ].partition_owner != MICO_FLASH_NONE, exit, err = kNotFoundErr );
000052  bf00              NOP      
000054  eb040084          ADD      r0,r4,r4,LSL #2
000058  493f              LDR      r1,|L9.344|
00005a  f8110020          LDRB     r0,[r1,r0,LSL #2]
00005e  2803              CMP      r0,#3
000060  d102              BNE      |L9.104|
000062  4f3e              LDR      r7,|L9.348|
000064  3f16              SUBS     r7,r7,#0x16
000066  e074              B        |L9.338|
                  |L9.104|
000068  bf00              NOP      
;;;651    #ifndef BOOTLOADER
;;;652      require_action_quiet( ( mico_partitions[ partition ].partition_options & PAR_OPT_READ_MASK ) == PAR_OPT_READ_EN, exit, err = kPermissionErr );
00006a  bf00              NOP      
00006c  eb040084          ADD      r0,r4,r4,LSL #2
000070  4939              LDR      r1,|L9.344|
000072  eb010080          ADD      r0,r1,r0,LSL #2
000076  7c00              LDRB     r0,[r0,#0x10]
000078  f0000001          AND      r0,r0,#1
00007c  b910              CBNZ     r0,|L9.132|
00007e  4f37              LDR      r7,|L9.348|
000080  3f44              SUBS     r7,r7,#0x44
000082  e066              B        |L9.338|
                  |L9.132|
000084  bf00              NOP      
;;;653    #endif
;;;654    
;;;655      require_action_quiet( start_addr >= mico_partitions[ partition ].partition_start_addr, exit, err = kParamErr );
000086  bf00              NOP      
000088  eb040084          ADD      r0,r4,r4,LSL #2
00008c  4932              LDR      r1,|L9.344|
00008e  eb010080          ADD      r0,r1,r0,LSL #2
000092  6880              LDR      r0,[r0,#8]
000094  9900              LDR      r1,[sp,#0]
000096  4288              CMP      r0,r1
000098  d901              BLS      |L9.158|
00009a  4f30              LDR      r7,|L9.348|
00009c  e059              B        |L9.338|
                  |L9.158|
00009e  bf00              NOP      
;;;656      require_action_quiet( end_addr < mico_partitions[ partition ].partition_start_addr + mico_partitions[ partition ].partition_length , exit, err = kParamErr );
0000a0  bf00              NOP      
0000a2  eb040084          ADD      r0,r4,r4,LSL #2
0000a6  492c              LDR      r1,|L9.344|
0000a8  eb010080          ADD      r0,r1,r0,LSL #2
0000ac  6880              LDR      r0,[r0,#8]
0000ae  eb040184          ADD      r1,r4,r4,LSL #2
0000b2  4a29              LDR      r2,|L9.344|
0000b4  eb020181          ADD      r1,r2,r1,LSL #2
0000b8  68c9              LDR      r1,[r1,#0xc]
0000ba  4408              ADD      r0,r0,r1
0000bc  4548              CMP      r0,r9
0000be  d801              BHI      |L9.196|
0000c0  4f26              LDR      r7,|L9.348|
0000c2  e046              B        |L9.338|
                  |L9.196|
0000c4  bf00              NOP      
;;;657    
;;;658      if( platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].initialized == false )
0000c6  eb040084          ADD      r0,r4,r4,LSL #2
0000ca  4923              LDR      r1,|L9.344|
0000cc  f8110020          LDRB     r0,[r1,r0,LSL #2]
0000d0  eb000040          ADD      r0,r0,r0,LSL #1
0000d4  4922              LDR      r1,|L9.352|
0000d6  eb010080          ADD      r0,r1,r0,LSL #2
0000da  7a00              LDRB     r0,[r0,#8]
0000dc  b938              CBNZ     r0,|L9.238|
;;;659      {
;;;660        err =  MicoFlashInitialize( partition );
0000de  4620              MOV      r0,r4
0000e0  f7fffffe          BL       MicoFlashInitialize
0000e4  4607              MOV      r7,r0
;;;661        require_noerr_quiet( err, exit );
0000e6  bf00              NOP      
0000e8  b107              CBZ      r7,|L9.236|
0000ea  e032              B        |L9.338|
                  |L9.236|
0000ec  bf00              NOP      
                  |L9.238|
;;;662      }
;;;663    
;;;664      mico_rtos_lock_mutex( &platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex );
0000ee  eb040184          ADD      r1,r4,r4,LSL #2
0000f2  4a19              LDR      r2,|L9.344|
0000f4  f8121021          LDRB     r1,[r2,r1,LSL #2]
0000f8  eb010141          ADD      r1,r1,r1,LSL #1
0000fc  4a18              LDR      r2,|L9.352|
0000fe  eb020181          ADD      r1,r2,r1,LSL #2
000102  1d08              ADDS     r0,r1,#4
000104  f7fffffe          BL       mico_rtos_lock_mutex
;;;665      err = platform_flash_read( &platform_flash_peripherals[ mico_partitions[ partition ].partition_owner ], &start_addr, outBuffer, inBufferLength );
000108  eb040184          ADD      r1,r4,r4,LSL #2
00010c  4a12              LDR      r2,|L9.344|
00010e  f8121021          LDRB     r1,[r2,r1,LSL #2]
000112  4a14              LDR      r2,|L9.356|
000114  eb021001          ADD      r0,r2,r1,LSL #4
000118  4633              MOV      r3,r6
00011a  4642              MOV      r2,r8
00011c  4669              MOV      r1,sp
00011e  f7fffffe          BL       platform_flash_read
000122  4607              MOV      r7,r0
;;;666      *off_set = start_addr - mico_partitions[ partition ].partition_start_addr;
000124  eb040084          ADD      r0,r4,r4,LSL #2
000128  490b              LDR      r1,|L9.344|
00012a  eb010080          ADD      r0,r1,r0,LSL #2
00012e  6880              LDR      r0,[r0,#8]
000130  9900              LDR      r1,[sp,#0]
000132  1a08              SUBS     r0,r1,r0
000134  6028              STR      r0,[r5,#0]
;;;667      mico_rtos_unlock_mutex( &platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex );
000136  eb040184          ADD      r1,r4,r4,LSL #2
00013a  4a07              LDR      r2,|L9.344|
00013c  f8121021          LDRB     r1,[r2,r1,LSL #2]
000140  eb010141          ADD      r1,r1,r1,LSL #1
000144  4a06              LDR      r2,|L9.352|
000146  eb020181          ADD      r1,r2,r1,LSL #2
00014a  1d08              ADDS     r0,r1,#4
00014c  f7fffffe          BL       mico_rtos_unlock_mutex
;;;668    
;;;669    exit:
000150  bf00              NOP      
                  |L9.338|
;;;670      return err;
000152  4638              MOV      r0,r7
;;;671    }
000154  e8bd83f8          POP      {r3-r9,pc}
;;;672    
                          ENDP

                  |L9.344|
                          DCD      mico_partitions
                  |L9.348|
                          DCD      0xffffe5cf
                  |L9.352|
                          DCD      platform_flash_drivers
                  |L9.356|
                          DCD      platform_flash_peripherals

                          AREA ||i.MicoFlashWrite||, CODE, READONLY, ALIGN=2

                  MicoFlashWrite PROC
;;;604    
;;;605    OSStatus MicoFlashWrite( mico_partition_t partition, volatile uint32_t* off_set, uint8_t* inBuffer ,uint32_t inBufferLength)
000000  e92d43f8          PUSH     {r3-r9,lr}
;;;606    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4690              MOV      r8,r2
00000a  461e              MOV      r6,r3
;;;607      OSStatus err = kNoErr;
00000c  2700              MOVS     r7,#0
;;;608      uint32_t start_addr = mico_partitions[ partition ].partition_start_addr + *off_set;
00000e  eb040084          ADD      r0,r4,r4,LSL #2
000012  4952              LDR      r1,|L10.348|
000014  eb010080          ADD      r0,r1,r0,LSL #2
000018  6880              LDR      r0,[r0,#8]
00001a  6829              LDR      r1,[r5,#0]
00001c  4408              ADD      r0,r0,r1
00001e  9000              STR      r0,[sp,#0]
;;;609      uint32_t end_addr = mico_partitions[ partition ].partition_start_addr + *off_set + inBufferLength - 1;
000020  eb040084          ADD      r0,r4,r4,LSL #2
000024  494d              LDR      r1,|L10.348|
000026  eb010080          ADD      r0,r1,r0,LSL #2
00002a  6880              LDR      r0,[r0,#8]
00002c  6829              LDR      r1,[r5,#0]
00002e  4408              ADD      r0,r0,r1
000030  4430              ADD      r0,r0,r6
000032  f1a00901          SUB      r9,r0,#1
;;;610    
;;;611      if (inBufferLength == 0)
000036  b906              CBNZ     r6,|L10.58|
;;;612        goto exit;
000038  e08c              B        |L10.340|
                  |L10.58|
;;;613      require_action_quiet( partition > MICO_PARTITION_ERROR, exit, err = kParamErr );
00003a  bf00              NOP      
00003c  2c00              CMP      r4,#0
00003e  da01              BGE      |L10.68|
000040  4f47              LDR      r7,|L10.352|
000042  e087              B        |L10.340|
                  |L10.68|
000044  bf00              NOP      
;;;614      require_action_quiet( partition < MICO_PARTITION_MAX, exit, err = kParamErr );
000046  bf00              NOP      
000048  2c07              CMP      r4,#7
00004a  db01              BLT      |L10.80|
00004c  4f44              LDR      r7,|L10.352|
00004e  e081              B        |L10.340|
                  |L10.80|
000050  bf00              NOP      
;;;615      
;;;616      require_action_quiet( mico_partitions[ partition ].partition_owner != MICO_FLASH_NONE, exit, err = kNotFoundErr );
000052  bf00              NOP      
000054  eb040084          ADD      r0,r4,r4,LSL #2
000058  4940              LDR      r1,|L10.348|
00005a  f8110020          LDRB     r0,[r1,r0,LSL #2]
00005e  2803              CMP      r0,#3
000060  d102              BNE      |L10.104|
000062  4f3f              LDR      r7,|L10.352|
000064  3f16              SUBS     r7,r7,#0x16
000066  e075              B        |L10.340|
                  |L10.104|
000068  bf00              NOP      
;;;617    #ifndef BOOTLOADER
;;;618      require_action_quiet( ( mico_partitions[ partition ].partition_options & PAR_OPT_WRITE_MASK ) == PAR_OPT_WRITE_EN, exit, err = kPermissionErr );
00006a  bf00              NOP      
00006c  eb040084          ADD      r0,r4,r4,LSL #2
000070  493a              LDR      r1,|L10.348|
000072  eb010080          ADD      r0,r1,r0,LSL #2
000076  7c00              LDRB     r0,[r0,#0x10]
000078  f0000002          AND      r0,r0,#2
00007c  2802              CMP      r0,#2
00007e  d002              BEQ      |L10.134|
000080  4f37              LDR      r7,|L10.352|
000082  3f44              SUBS     r7,r7,#0x44
000084  e066              B        |L10.340|
                  |L10.134|
000086  bf00              NOP      
;;;619    #endif
;;;620    
;;;621      require_action_quiet( start_addr >= mico_partitions[ partition ].partition_start_addr, exit, err = kParamErr );
000088  bf00              NOP      
00008a  eb040084          ADD      r0,r4,r4,LSL #2
00008e  4933              LDR      r1,|L10.348|
000090  eb010080          ADD      r0,r1,r0,LSL #2
000094  6880              LDR      r0,[r0,#8]
000096  9900              LDR      r1,[sp,#0]
000098  4288              CMP      r0,r1
00009a  d901              BLS      |L10.160|
00009c  4f30              LDR      r7,|L10.352|
00009e  e059              B        |L10.340|
                  |L10.160|
0000a0  bf00              NOP      
;;;622      require_action_quiet( end_addr < mico_partitions[ partition ].partition_start_addr + mico_partitions[ partition ].partition_length , exit, err = kParamErr );
0000a2  bf00              NOP      
0000a4  eb040084          ADD      r0,r4,r4,LSL #2
0000a8  492c              LDR      r1,|L10.348|
0000aa  eb010080          ADD      r0,r1,r0,LSL #2
0000ae  6880              LDR      r0,[r0,#8]
0000b0  eb040184          ADD      r1,r4,r4,LSL #2
0000b4  4a29              LDR      r2,|L10.348|
0000b6  eb020181          ADD      r1,r2,r1,LSL #2
0000ba  68c9              LDR      r1,[r1,#0xc]
0000bc  4408              ADD      r0,r0,r1
0000be  4548              CMP      r0,r9
0000c0  d801              BHI      |L10.198|
0000c2  4f27              LDR      r7,|L10.352|
0000c4  e046              B        |L10.340|
                  |L10.198|
0000c6  bf00              NOP      
;;;623      
;;;624      if( platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].initialized == false )
0000c8  eb040084          ADD      r0,r4,r4,LSL #2
0000cc  4923              LDR      r1,|L10.348|
0000ce  f8110020          LDRB     r0,[r1,r0,LSL #2]
0000d2  eb000040          ADD      r0,r0,r0,LSL #1
0000d6  4923              LDR      r1,|L10.356|
0000d8  eb010080          ADD      r0,r1,r0,LSL #2
0000dc  7a00              LDRB     r0,[r0,#8]
0000de  b938              CBNZ     r0,|L10.240|
;;;625      {
;;;626        err =  MicoFlashInitialize( partition );
0000e0  4620              MOV      r0,r4
0000e2  f7fffffe          BL       MicoFlashInitialize
0000e6  4607              MOV      r7,r0
;;;627        require_noerr_quiet( err, exit );
0000e8  bf00              NOP      
0000ea  b107              CBZ      r7,|L10.238|
0000ec  e032              B        |L10.340|
                  |L10.238|
0000ee  bf00              NOP      
                  |L10.240|
;;;628      }
;;;629    
;;;630      mico_rtos_lock_mutex( &platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex );
0000f0  eb040184          ADD      r1,r4,r4,LSL #2
0000f4  4a19              LDR      r2,|L10.348|
0000f6  f8121021          LDRB     r1,[r2,r1,LSL #2]
0000fa  eb010141          ADD      r1,r1,r1,LSL #1
0000fe  4a19              LDR      r2,|L10.356|
000100  eb020181          ADD      r1,r2,r1,LSL #2
000104  1d08              ADDS     r0,r1,#4
000106  f7fffffe          BL       mico_rtos_lock_mutex
;;;631      err = platform_flash_write( &platform_flash_peripherals[ mico_partitions[ partition ].partition_owner ], &start_addr, inBuffer, inBufferLength );
00010a  eb040184          ADD      r1,r4,r4,LSL #2
00010e  4a13              LDR      r2,|L10.348|
000110  f8121021          LDRB     r1,[r2,r1,LSL #2]
000114  4a14              LDR      r2,|L10.360|
000116  eb021001          ADD      r0,r2,r1,LSL #4
00011a  4633              MOV      r3,r6
00011c  4642              MOV      r2,r8
00011e  4669              MOV      r1,sp
000120  f7fffffe          BL       platform_flash_write
000124  4607              MOV      r7,r0
;;;632      *off_set = start_addr - mico_partitions[ partition ].partition_start_addr;
000126  eb040084          ADD      r0,r4,r4,LSL #2
00012a  490c              LDR      r1,|L10.348|
00012c  eb010080          ADD      r0,r1,r0,LSL #2
000130  6880              LDR      r0,[r0,#8]
000132  9900              LDR      r1,[sp,#0]
000134  1a08              SUBS     r0,r1,r0
000136  6028              STR      r0,[r5,#0]
;;;633      mico_rtos_unlock_mutex( &platform_flash_drivers[ mico_partitions[ partition ].partition_owner ].flash_mutex );
000138  eb040184          ADD      r1,r4,r4,LSL #2
00013c  4a07              LDR      r2,|L10.348|
00013e  f8121021          LDRB     r1,[r2,r1,LSL #2]
000142  eb010141          ADD      r1,r1,r1,LSL #1
000146  4a07              LDR      r2,|L10.356|
000148  eb020181          ADD      r1,r2,r1,LSL #2
00014c  1d08              ADDS     r0,r1,#4
00014e  f7fffffe          BL       mico_rtos_unlock_mutex
;;;634      
;;;635    exit:
000152  bf00              NOP      
                  |L10.340|
;;;636      return err;
000154  4638              MOV      r0,r7
;;;637    }
000156  e8bd83f8          POP      {r3-r9,pc}
;;;638    
                          ENDP

00015a  0000              DCW      0x0000
                  |L10.348|
                          DCD      mico_partitions
                  |L10.352|
                          DCD      0xffffe5cf
                  |L10.356|
                          DCD      platform_flash_drivers
                  |L10.360|
                          DCD      platform_flash_peripherals

                          AREA ||i.MicoGpioDisableIRQ||, CODE, READONLY, ALIGN=2

                  MicoGpioDisableIRQ PROC
;;;209    
;;;210    OSStatus MicoGpioDisableIRQ( mico_gpio_t gpio )
000000  b510              PUSH     {r4,lr}
;;;211    {
000002  4604              MOV      r4,r0
;;;212      if ( gpio >= MICO_GPIO_NONE )
000004  2c0d              CMP      r4,#0xd
000006  db01              BLT      |L11.12|
;;;213        return kUnsupportedErr;
000008  4803              LDR      r0,|L11.24|
                  |L11.10|
;;;214      return (OSStatus) platform_gpio_irq_disable( &platform_gpio_pins[gpio] );
;;;215    }
00000a  bd10              POP      {r4,pc}
                  |L11.12|
00000c  4903              LDR      r1,|L11.28|
00000e  eb0100c4          ADD      r0,r1,r4,LSL #3       ;214
000012  f7fffffe          BL       platform_gpio_irq_disable
000016  e7f8              B        |L11.10|
;;;216    
                          ENDP

                  |L11.24|
                          DCD      0xffffe5b1
                  |L11.28|
                          DCD      platform_gpio_pins

                          AREA ||i.MicoGpioEnableIRQ||, CODE, READONLY, ALIGN=2

                  MicoGpioEnableIRQ PROC
;;;202    
;;;203    OSStatus MicoGpioEnableIRQ( mico_gpio_t gpio, mico_gpio_irq_trigger_t trigger, mico_gpio_irq_handler_t handler, void* arg )
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;204    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
00000a  461f              MOV      r7,r3
;;;205      if ( gpio >= MICO_GPIO_NONE )
00000c  2c0d              CMP      r4,#0xd
00000e  db02              BLT      |L12.22|
;;;206        return kUnsupportedErr;
000010  4805              LDR      r0,|L12.40|
                  |L12.18|
;;;207      return (OSStatus) platform_gpio_irq_enable( &platform_gpio_pins[gpio], trigger, handler, arg );
;;;208    }
000012  e8bd81f0          POP      {r4-r8,pc}
                  |L12.22|
000016  4905              LDR      r1,|L12.44|
000018  eb0100c4          ADD      r0,r1,r4,LSL #3       ;207
00001c  463b              MOV      r3,r7                 ;207
00001e  4632              MOV      r2,r6                 ;207
000020  4629              MOV      r1,r5                 ;207
000022  f7fffffe          BL       platform_gpio_irq_enable
000026  e7f4              B        |L12.18|
;;;209    
                          ENDP

                  |L12.40|
                          DCD      0xffffe5b1
                  |L12.44|
                          DCD      platform_gpio_pins

                          AREA ||i.MicoGpioFinalize||, CODE, READONLY, ALIGN=2

                  MicoGpioFinalize PROC
;;;188    
;;;189    OSStatus MicoGpioFinalize( mico_gpio_t gpio )
000000  b510              PUSH     {r4,lr}
;;;190    {
000002  4604              MOV      r4,r0
;;;191      if ( gpio >= MICO_GPIO_NONE )
000004  2c0d              CMP      r4,#0xd
000006  db01              BLT      |L13.12|
;;;192        return kUnsupportedErr;
000008  4803              LDR      r0,|L13.24|
                  |L13.10|
;;;193      return (OSStatus) platform_gpio_deinit( &platform_gpio_pins[gpio] );
;;;194    }
00000a  bd10              POP      {r4,pc}
                  |L13.12|
00000c  4903              LDR      r1,|L13.28|
00000e  eb0100c4          ADD      r0,r1,r4,LSL #3       ;193
000012  f7fffffe          BL       platform_gpio_deinit
000016  e7f8              B        |L13.10|
;;;195    
                          ENDP

                  |L13.24|
                          DCD      0xffffe5b1
                  |L13.28|
                          DCD      platform_gpio_pins

                          AREA ||i.MicoGpioInitialize||, CODE, READONLY, ALIGN=2

                  MicoGpioInitialize PROC
;;;160    
;;;161    OSStatus MicoGpioInitialize( mico_gpio_t gpio, mico_gpio_config_t configuration )
000000  b570              PUSH     {r4-r6,lr}
;;;162    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;163      if ( gpio >= MICO_GPIO_NONE )
000006  2c0d              CMP      r4,#0xd
000008  db01              BLT      |L14.14|
;;;164        return kUnsupportedErr;
00000a  4804              LDR      r0,|L14.28|
                  |L14.12|
;;;165      return (OSStatus) platform_gpio_init( &platform_gpio_pins[gpio], configuration );
;;;166    }
00000c  bd70              POP      {r4-r6,pc}
                  |L14.14|
00000e  4904              LDR      r1,|L14.32|
000010  eb0100c4          ADD      r0,r1,r4,LSL #3       ;165
000014  4629              MOV      r1,r5                 ;165
000016  f7fffffe          BL       platform_gpio_init
00001a  e7f7              B        |L14.12|
;;;167    
                          ENDP

                  |L14.28|
                          DCD      0xffffe5b1
                  |L14.32|
                          DCD      platform_gpio_pins

                          AREA ||i.MicoGpioOutputHigh||, CODE, READONLY, ALIGN=2

                  MicoGpioOutputHigh PROC
;;;167    
;;;168    OSStatus MicoGpioOutputHigh( mico_gpio_t gpio )
000000  b510              PUSH     {r4,lr}
;;;169    {
000002  4604              MOV      r4,r0
;;;170      if ( gpio >= MICO_GPIO_NONE )
000004  2c0d              CMP      r4,#0xd
000006  db01              BLT      |L15.12|
;;;171        return kUnsupportedErr;
000008  4803              LDR      r0,|L15.24|
                  |L15.10|
;;;172      return (OSStatus) platform_gpio_output_high( &platform_gpio_pins[gpio] );
;;;173    }
00000a  bd10              POP      {r4,pc}
                  |L15.12|
00000c  4903              LDR      r1,|L15.28|
00000e  eb0100c4          ADD      r0,r1,r4,LSL #3       ;172
000012  f7fffffe          BL       platform_gpio_output_high
000016  e7f8              B        |L15.10|
;;;174    
                          ENDP

                  |L15.24|
                          DCD      0xffffe5b1
                  |L15.28|
                          DCD      platform_gpio_pins

                          AREA ||i.MicoGpioOutputLow||, CODE, READONLY, ALIGN=2

                  MicoGpioOutputLow PROC
;;;174    
;;;175    OSStatus MicoGpioOutputLow( mico_gpio_t gpio )
000000  b510              PUSH     {r4,lr}
;;;176    {
000002  4604              MOV      r4,r0
;;;177      if ( gpio >= MICO_GPIO_NONE )
000004  2c0d              CMP      r4,#0xd
000006  db01              BLT      |L16.12|
;;;178        return kUnsupportedErr;
000008  4803              LDR      r0,|L16.24|
                  |L16.10|
;;;179      return (OSStatus) platform_gpio_output_low( &platform_gpio_pins[gpio] );
;;;180    }
00000a  bd10              POP      {r4,pc}
                  |L16.12|
00000c  4903              LDR      r1,|L16.28|
00000e  eb0100c4          ADD      r0,r1,r4,LSL #3       ;179
000012  f7fffffe          BL       platform_gpio_output_low
000016  e7f8              B        |L16.10|
;;;181    
                          ENDP

                  |L16.24|
                          DCD      0xffffe5b1
                  |L16.28|
                          DCD      platform_gpio_pins

                          AREA ||i.MicoGpioOutputTrigger||, CODE, READONLY, ALIGN=2

                  MicoGpioOutputTrigger PROC
;;;181    
;;;182    OSStatus MicoGpioOutputTrigger( mico_gpio_t gpio )
000000  b510              PUSH     {r4,lr}
;;;183    {
000002  4604              MOV      r4,r0
;;;184      if ( gpio >= MICO_GPIO_NONE )
000004  2c0d              CMP      r4,#0xd
000006  db01              BLT      |L17.12|
;;;185        return kUnsupportedErr;
000008  4803              LDR      r0,|L17.24|
                  |L17.10|
;;;186      return (OSStatus) platform_gpio_output_trigger( &platform_gpio_pins[gpio] );
;;;187    }
00000a  bd10              POP      {r4,pc}
                  |L17.12|
00000c  4903              LDR      r1,|L17.28|
00000e  eb0100c4          ADD      r0,r1,r4,LSL #3       ;186
000012  f7fffffe          BL       platform_gpio_output_trigger
000016  e7f8              B        |L17.10|
;;;188    
                          ENDP

                  |L17.24|
                          DCD      0xffffe5b1
                  |L17.28|
                          DCD      platform_gpio_pins

                          AREA ||i.MicoI2cBuildCombinedMessage||, CODE, READONLY, ALIGN=1

                  MicoI2cBuildCombinedMessage PROC
;;;289    
;;;290    OSStatus MicoI2cBuildCombinedMessage( mico_i2c_message_t* message, const void* tx_buffer, void* rx_buffer, uint16_t tx_buffer_length, uint16_t rx_buffer_length, uint16_t retries )
000000  e92d47fc          PUSH     {r2-r10,lr}
;;;291    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
00000a  461f              MOV      r7,r3
00000c  e9dd890a          LDRD     r8,r9,[sp,#0x28]
;;;292      return (OSStatus) platform_i2c_init_combined_message( message, tx_buffer, rx_buffer, tx_buffer_length, rx_buffer_length, retries );
000010  463b              MOV      r3,r7
000012  4632              MOV      r2,r6
000014  4629              MOV      r1,r5
000016  4620              MOV      r0,r4
000018  e9cd8900          STRD     r8,r9,[sp,#0]
00001c  f7fffffe          BL       platform_i2c_init_combined_message
;;;293    }
000020  e8bd87fc          POP      {r2-r10,pc}
;;;294    
                          ENDP


                          AREA ||i.MicoI2cBuildRxMessage||, CODE, READONLY, ALIGN=1

                  MicoI2cBuildRxMessage PROC
;;;284    
;;;285    OSStatus MicoI2cBuildRxMessage( mico_i2c_message_t* message, void* rx_buffer, uint16_t rx_buffer_length, uint16_t retries )
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;286    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
00000a  461f              MOV      r7,r3
;;;287      return (OSStatus) platform_i2c_init_rx_message( message, rx_buffer, rx_buffer_length, retries );
00000c  463b              MOV      r3,r7
00000e  4632              MOV      r2,r6
000010  4629              MOV      r1,r5
000012  4620              MOV      r0,r4
000014  f7fffffe          BL       platform_i2c_init_rx_message
;;;288    }
000018  e8bd81f0          POP      {r4-r8,pc}
;;;289    
                          ENDP


                          AREA ||i.MicoI2cBuildTxMessage||, CODE, READONLY, ALIGN=1

                  MicoI2cBuildTxMessage PROC
;;;279    
;;;280    OSStatus MicoI2cBuildTxMessage( mico_i2c_message_t* message, const void* tx_buffer, uint16_t  tx_buffer_length, uint16_t retries )
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;281    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
00000a  461f              MOV      r7,r3
;;;282      return (OSStatus) platform_i2c_init_tx_message( message, tx_buffer, tx_buffer_length, retries );
00000c  463b              MOV      r3,r7
00000e  4632              MOV      r2,r6
000010  4629              MOV      r1,r5
000012  4620              MOV      r0,r4
000014  f7fffffe          BL       platform_i2c_init_tx_message
;;;283    }
000018  e8bd81f0          POP      {r4-r8,pc}
;;;284    
                          ENDP


                          AREA ||i.MicoI2cFinalize||, CODE, READONLY, ALIGN=2

                  MicoI2cFinalize PROC
;;;239    
;;;240    OSStatus MicoI2cFinalize( mico_i2c_device_t* device )
000000  b51c              PUSH     {r2-r4,lr}
;;;241    {
000002  4604              MOV      r4,r0
;;;242      platform_i2c_config_t config;
;;;243    
;;;244      if ( device->port >= MICO_I2C_NONE )
000004  7820              LDRB     r0,[r4,#0]
000006  2802              CMP      r0,#2
000008  db01              BLT      |L21.14|
;;;245        return kUnsupportedErr;
00000a  4816              LDR      r0,|L21.100|
                  |L21.12|
;;;246      
;;;247      config.address       = device->address;
;;;248      config.address_width = device->address_width;
;;;249      config.flags         &= ~I2C_DEVICE_USE_DMA ;
;;;250      config.speed_mode    = device->speed_mode;
;;;251    
;;;252      if( platform_i2c_drivers[device->port].i2c_mutex != NULL){
;;;253        mico_rtos_deinit_mutex( &platform_i2c_drivers[device->port].i2c_mutex );
;;;254        platform_i2c_drivers[device->port].i2c_mutex = NULL;
;;;255      }
;;;256        
;;;257      return (OSStatus) platform_i2c_deinit( &platform_i2c_peripherals[device->port], &config );
;;;258    }
00000c  bd1c              POP      {r2-r4,pc}
                  |L21.14|
00000e  8860              LDRH     r0,[r4,#2]            ;247
000010  f8ad0000          STRH     r0,[sp,#0]            ;247
000014  7920              LDRB     r0,[r4,#4]            ;248
000016  f88d0002          STRB     r0,[sp,#2]            ;248
00001a  f89d0003          LDRB     r0,[sp,#3]            ;249
00001e  f0200001          BIC      r0,r0,#1              ;249
000022  f88d0003          STRB     r0,[sp,#3]            ;249
000026  7960              LDRB     r0,[r4,#5]            ;250
000028  f88d0004          STRB     r0,[sp,#4]            ;250
00002c  7820              LDRB     r0,[r4,#0]            ;252
00002e  490e              LDR      r1,|L21.104|
000030  f8510020          LDR      r0,[r1,r0,LSL #2]     ;252
000034  b150              CBZ      r0,|L21.76|
000036  7821              LDRB     r1,[r4,#0]            ;253
000038  4a0b              LDR      r2,|L21.104|
00003a  eb020081          ADD      r0,r2,r1,LSL #2       ;253
00003e  f7fffffe          BL       mico_rtos_deinit_mutex
000042  2000              MOVS     r0,#0                 ;254
000044  7821              LDRB     r1,[r4,#0]            ;254
000046  4a08              LDR      r2,|L21.104|
000048  f8420021          STR      r0,[r2,r1,LSL #2]     ;254
                  |L21.76|
00004c  7821              LDRB     r1,[r4,#0]            ;257
00004e  eb010281          ADD      r2,r1,r1,LSL #2       ;257
000052  eb0201c1          ADD      r1,r2,r1,LSL #3       ;257
000056  4a05              LDR      r2,|L21.108|
000058  eb020081          ADD      r0,r2,r1,LSL #2       ;257
00005c  4669              MOV      r1,sp                 ;257
00005e  f7fffffe          BL       platform_i2c_deinit
000062  e7d3              B        |L21.12|
;;;259    
                          ENDP

                  |L21.100|
                          DCD      0xffffe5b1
                  |L21.104|
                          DCD      platform_i2c_drivers
                  |L21.108|
                          DCD      platform_i2c_peripherals

                          AREA ||i.MicoI2cInitialize||, CODE, READONLY, ALIGN=2

                  MicoI2cInitialize PROC
;;;216    
;;;217    OSStatus MicoI2cInitialize( mico_i2c_device_t* device )
000000  b57c              PUSH     {r2-r6,lr}
;;;218    {
000002  4604              MOV      r4,r0
;;;219      platform_i2c_config_t config;
;;;220      OSStatus result;
;;;221    
;;;222      if ( device->port >= MICO_I2C_NONE )
000004  7820              LDRB     r0,[r4,#0]
000006  2802              CMP      r0,#2
000008  db01              BLT      |L22.14|
;;;223        return kUnsupportedErr;
00000a  481b              LDR      r0,|L22.120|
                  |L22.12|
;;;224     
;;;225      config.address       = device->address;
;;;226      config.address_width = device->address_width;
;;;227      config.flags         &= ~I2C_DEVICE_USE_DMA ;
;;;228      config.speed_mode    = device->speed_mode;
;;;229    
;;;230      if( platform_i2c_drivers[device->port].i2c_mutex == NULL)
;;;231        mico_rtos_init_mutex( &platform_i2c_drivers[device->port].i2c_mutex );
;;;232      
;;;233      mico_rtos_lock_mutex( &platform_i2c_drivers[device->port].i2c_mutex );
;;;234      result = (OSStatus) platform_i2c_init( &platform_i2c_peripherals[device->port], &config );
;;;235      mico_rtos_unlock_mutex( &platform_i2c_drivers[device->port].i2c_mutex );
;;;236    
;;;237      return result;
;;;238    }
00000c  bd7c              POP      {r2-r6,pc}
                  |L22.14|
00000e  8860              LDRH     r0,[r4,#2]            ;225
000010  f8ad0000          STRH     r0,[sp,#0]            ;225
000014  7920              LDRB     r0,[r4,#4]            ;226
000016  f88d0002          STRB     r0,[sp,#2]            ;226
00001a  f89d0003          LDRB     r0,[sp,#3]            ;227
00001e  f0200001          BIC      r0,r0,#1              ;227
000022  f88d0003          STRB     r0,[sp,#3]            ;227
000026  7960              LDRB     r0,[r4,#5]            ;228
000028  f88d0004          STRB     r0,[sp,#4]            ;228
00002c  7820              LDRB     r0,[r4,#0]            ;230
00002e  4913              LDR      r1,|L22.124|
000030  f8510020          LDR      r0,[r1,r0,LSL #2]     ;230
000034  b928              CBNZ     r0,|L22.66|
000036  7821              LDRB     r1,[r4,#0]            ;231
000038  4a10              LDR      r2,|L22.124|
00003a  eb020081          ADD      r0,r2,r1,LSL #2       ;231
00003e  f7fffffe          BL       mico_rtos_init_mutex
                  |L22.66|
000042  7821              LDRB     r1,[r4,#0]            ;233
000044  4a0d              LDR      r2,|L22.124|
000046  eb020081          ADD      r0,r2,r1,LSL #2       ;233
00004a  f7fffffe          BL       mico_rtos_lock_mutex
00004e  7821              LDRB     r1,[r4,#0]            ;234
000050  eb010281          ADD      r2,r1,r1,LSL #2       ;234
000054  eb0201c1          ADD      r1,r2,r1,LSL #3       ;234
000058  4a09              LDR      r2,|L22.128|
00005a  eb020081          ADD      r0,r2,r1,LSL #2       ;234
00005e  4669              MOV      r1,sp                 ;234
000060  f7fffffe          BL       platform_i2c_init
000064  4605              MOV      r5,r0                 ;234
000066  7821              LDRB     r1,[r4,#0]            ;235
000068  4a04              LDR      r2,|L22.124|
00006a  eb020081          ADD      r0,r2,r1,LSL #2       ;235
00006e  f7fffffe          BL       mico_rtos_unlock_mutex
000072  4628              MOV      r0,r5                 ;237
000074  e7ca              B        |L22.12|
;;;239    
                          ENDP

000076  0000              DCW      0x0000
                  |L22.120|
                          DCD      0xffffe5b1
                  |L22.124|
                          DCD      platform_i2c_drivers
                  |L22.128|
                          DCD      platform_i2c_peripherals

                          AREA ||i.MicoI2cProbeDevice||, CODE, READONLY, ALIGN=2

                  MicoI2cProbeDevice PROC
;;;259    
;;;260    bool MicoI2cProbeDevice( mico_i2c_device_t* device, int retries )
000000  b57c              PUSH     {r2-r6,lr}
;;;261    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;262      bool ret;
;;;263      platform_i2c_config_t config;
;;;264    
;;;265      if ( device->port >= MICO_I2C_NONE )
000006  7820              LDRB     r0,[r4,#0]
000008  2802              CMP      r0,#2
00000a  db01              BLT      |L23.16|
;;;266        return kUnsupportedErr;
00000c  2001              MOVS     r0,#1
                  |L23.14|
;;;267      
;;;268      config.address       = device->address;
;;;269      config.address_width = device->address_width;
;;;270      config.flags         &= ~I2C_DEVICE_USE_DMA ;
;;;271      config.speed_mode    = device->speed_mode;
;;;272    
;;;273      mico_rtos_lock_mutex( &platform_i2c_drivers[device->port].i2c_mutex );
;;;274      ret = platform_i2c_probe_device( &platform_i2c_peripherals[device->port], &config, retries );
;;;275      mico_rtos_unlock_mutex( &platform_i2c_drivers[device->port].i2c_mutex );
;;;276    
;;;277      return ret;
;;;278    }
00000e  bd7c              POP      {r2-r6,pc}
                  |L23.16|
000010  8860              LDRH     r0,[r4,#2]            ;268
000012  f8ad0000          STRH     r0,[sp,#0]            ;268
000016  7920              LDRB     r0,[r4,#4]            ;269
000018  f88d0002          STRB     r0,[sp,#2]            ;269
00001c  f89d0003          LDRB     r0,[sp,#3]            ;270
000020  f0200001          BIC      r0,r0,#1              ;270
000024  f88d0003          STRB     r0,[sp,#3]            ;270
000028  7960              LDRB     r0,[r4,#5]            ;271
00002a  f88d0004          STRB     r0,[sp,#4]            ;271
00002e  7821              LDRB     r1,[r4,#0]            ;273
000030  4a0c              LDR      r2,|L23.100|
000032  eb020081          ADD      r0,r2,r1,LSL #2       ;273
000036  f7fffffe          BL       mico_rtos_lock_mutex
00003a  7821              LDRB     r1,[r4,#0]            ;274
00003c  eb010281          ADD      r2,r1,r1,LSL #2       ;274
000040  eb0201c1          ADD      r1,r2,r1,LSL #3       ;274
000044  4a08              LDR      r2,|L23.104|
000046  eb020081          ADD      r0,r2,r1,LSL #2       ;274
00004a  462a              MOV      r2,r5                 ;274
00004c  4669              MOV      r1,sp                 ;274
00004e  f7fffffe          BL       platform_i2c_probe_device
000052  4606              MOV      r6,r0                 ;274
000054  7821              LDRB     r1,[r4,#0]            ;275
000056  4a03              LDR      r2,|L23.100|
000058  eb020081          ADD      r0,r2,r1,LSL #2       ;275
00005c  f7fffffe          BL       mico_rtos_unlock_mutex
000060  4630              MOV      r0,r6                 ;277
000062  e7d4              B        |L23.14|
;;;279    
                          ENDP

                  |L23.100|
                          DCD      platform_i2c_drivers
                  |L23.104|
                          DCD      platform_i2c_peripherals

                          AREA ||i.MicoI2cTransfer||, CODE, READONLY, ALIGN=2

                  MicoI2cTransfer PROC
;;;294    
;;;295    OSStatus MicoI2cTransfer( mico_i2c_device_t* device, mico_i2c_message_t* messages, uint16_t number_of_messages )
000000  e92d41fc          PUSH     {r2-r8,lr}
;;;296    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
;;;297      OSStatus err = kNoErr;
00000a  2700              MOVS     r7,#0
;;;298      platform_i2c_config_t config;
;;;299      
;;;300      if ( device->port >= MICO_I2C_NONE )
00000c  7820              LDRB     r0,[r4,#0]
00000e  2802              CMP      r0,#2
000010  db02              BLT      |L24.24|
;;;301        return kUnsupportedErr;
000012  4817              LDR      r0,|L24.112|
                  |L24.20|
;;;302    
;;;303      config.address       = device->address;
;;;304      config.address_width = device->address_width;
;;;305      config.flags         &= ~I2C_DEVICE_USE_DMA ;
;;;306      config.speed_mode    = device->speed_mode;
;;;307      
;;;308      mico_rtos_lock_mutex( &platform_i2c_drivers[device->port].i2c_mutex );
;;;309      err = platform_i2c_transfer( &platform_i2c_peripherals[device->port], &config, messages, number_of_messages );
;;;310      mico_rtos_unlock_mutex( &platform_i2c_drivers[device->port].i2c_mutex );
;;;311    
;;;312      return err;
;;;313    }
000014  e8bd81fc          POP      {r2-r8,pc}
                  |L24.24|
000018  8860              LDRH     r0,[r4,#2]            ;303
00001a  f8ad0000          STRH     r0,[sp,#0]            ;303
00001e  7920              LDRB     r0,[r4,#4]            ;304
000020  f88d0002          STRB     r0,[sp,#2]            ;304
000024  f89d0003          LDRB     r0,[sp,#3]            ;305
000028  f0200001          BIC      r0,r0,#1              ;305
00002c  f88d0003          STRB     r0,[sp,#3]            ;305
000030  7960              LDRB     r0,[r4,#5]            ;306
000032  f88d0004          STRB     r0,[sp,#4]            ;306
000036  7821              LDRB     r1,[r4,#0]            ;308
000038  4a0e              LDR      r2,|L24.116|
00003a  eb020081          ADD      r0,r2,r1,LSL #2       ;308
00003e  f7fffffe          BL       mico_rtos_lock_mutex
000042  7821              LDRB     r1,[r4,#0]            ;309
000044  eb010281          ADD      r2,r1,r1,LSL #2       ;309
000048  eb0201c1          ADD      r1,r2,r1,LSL #3       ;309
00004c  4a0a              LDR      r2,|L24.120|
00004e  eb020081          ADD      r0,r2,r1,LSL #2       ;309
000052  4633              MOV      r3,r6                 ;309
000054  462a              MOV      r2,r5                 ;309
000056  4669              MOV      r1,sp                 ;309
000058  f7fffffe          BL       platform_i2c_transfer
00005c  4607              MOV      r7,r0                 ;309
00005e  7821              LDRB     r1,[r4,#0]            ;310
000060  4a04              LDR      r2,|L24.116|
000062  eb020081          ADD      r0,r2,r1,LSL #2       ;310
000066  f7fffffe          BL       mico_rtos_unlock_mutex
00006a  4638              MOV      r0,r7                 ;312
00006c  e7d2              B        |L24.20|
;;;314    
                          ENDP

00006e  0000              DCW      0x0000
                  |L24.112|
                          DCD      0xffffe5b1
                  |L24.116|
                          DCD      platform_i2c_drivers
                  |L24.120|
                          DCD      platform_i2c_peripherals

                          AREA ||i.MicoMcuPowerSaveConfig||, CODE, READONLY, ALIGN=1

                  MicoMcuPowerSaveConfig PROC
;;;314    
;;;315    void MicoMcuPowerSaveConfig( int enable )
000000  b510              PUSH     {r4,lr}
;;;316    {
000002  4604              MOV      r4,r0
;;;317      if (enable == 1)
000004  2c01              CMP      r4,#1
000006  d102              BNE      |L25.14|
;;;318        platform_mcu_powersave_enable( );
000008  f7fffffe          BL       platform_mcu_powersave_enable
00000c  e001              B        |L25.18|
                  |L25.14|
;;;319      else
;;;320        platform_mcu_powersave_disable( );
00000e  f7fffffe          BL       platform_mcu_powersave_disable
                  |L25.18|
;;;321    }
000012  bd10              POP      {r4,pc}
;;;322    
                          ENDP


                          AREA ||i.MicoNanosendDelay||, CODE, READONLY, ALIGN=1

                  MicoNanosendDelay PROC
;;;701    
;;;702    void MicoNanosendDelay( uint64_t delayns )
000000  b570              PUSH     {r4-r6,lr}
;;;703    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;704      platform_nanosecond_delay( delayns );
000006  4620              MOV      r0,r4
000008  4629              MOV      r1,r5
00000a  f7fffffe          BL       platform_nanosecond_delay
;;;705    }
00000e  bd70              POP      {r4-r6,pc}
;;;706    
                          ENDP


                          AREA ||i.MicoPwmInitialize||, CODE, READONLY, ALIGN=2

                  MicoPwmInitialize PROC
;;;328    
;;;329    OSStatus MicoPwmInitialize(mico_pwm_t pwm, uint32_t frequency, float duty_cycle)
000000  b570              PUSH     {r4-r6,lr}
;;;330    {
000002  ed2d8b02          VPUSH    {d8}
000006  4604              MOV      r4,r0
000008  460d              MOV      r5,r1
00000a  eeb08a40          VMOV.F32 s16,s0
;;;331      if ( pwm >= MICO_PWM_NONE )
00000e  2c01              CMP      r4,#1
000010  db03              BLT      |L27.26|
;;;332        return kUnsupportedErr;
000012  4807              LDR      r0,|L27.48|
                  |L27.20|
;;;333      return (OSStatus) platform_pwm_init( &platform_pwm_peripherals[pwm], frequency, duty_cycle );
;;;334    }
000014  ecbd8b02          VPOP     {d8}
000018  bd70              POP      {r4-r6,pc}
                  |L27.26|
00001a  eb040184          ADD      r1,r4,r4,LSL #2       ;333
00001e  4a05              LDR      r2,|L27.52|
000020  eb020081          ADD      r0,r2,r1,LSL #2       ;333
000024  eeb00a48          VMOV.F32 s0,s16                ;333
000028  4629              MOV      r1,r5                 ;333
00002a  f7fffffe          BL       platform_pwm_init
00002e  e7f1              B        |L27.20|
;;;335    
                          ENDP

                  |L27.48|
                          DCD      0xffffe5b1
                  |L27.52|
                          DCD      platform_pwm_peripherals

                          AREA ||i.MicoPwmStart||, CODE, READONLY, ALIGN=2

                  MicoPwmStart PROC
;;;335    
;;;336    OSStatus MicoPwmStart( mico_pwm_t pwm )
000000  b510              PUSH     {r4,lr}
;;;337    {
000002  4604              MOV      r4,r0
;;;338      if ( pwm >= MICO_PWM_NONE )
000004  2c01              CMP      r4,#1
000006  db01              BLT      |L28.12|
;;;339        return kUnsupportedErr;
000008  4804              LDR      r0,|L28.28|
                  |L28.10|
;;;340      return (OSStatus) platform_pwm_start( &platform_pwm_peripherals[pwm] );
;;;341    }
00000a  bd10              POP      {r4,pc}
                  |L28.12|
00000c  eb040184          ADD      r1,r4,r4,LSL #2       ;340
000010  4a03              LDR      r2,|L28.32|
000012  eb020081          ADD      r0,r2,r1,LSL #2       ;340
000016  f7fffffe          BL       platform_pwm_start
00001a  e7f6              B        |L28.10|
;;;342    
                          ENDP

                  |L28.28|
                          DCD      0xffffe5b1
                  |L28.32|
                          DCD      platform_pwm_peripherals

                          AREA ||i.MicoPwmStop||, CODE, READONLY, ALIGN=2

                  MicoPwmStop PROC
;;;342    
;;;343    OSStatus MicoPwmStop( mico_pwm_t pwm )
000000  b510              PUSH     {r4,lr}
;;;344    {
000002  4604              MOV      r4,r0
;;;345      if ( pwm >= MICO_PWM_NONE )
000004  2c01              CMP      r4,#1
000006  db01              BLT      |L29.12|
;;;346        return kUnsupportedErr;
000008  4804              LDR      r0,|L29.28|
                  |L29.10|
;;;347      return (OSStatus) platform_pwm_stop( &platform_pwm_peripherals[pwm] );
;;;348    }
00000a  bd10              POP      {r4,pc}
                  |L29.12|
00000c  eb040184          ADD      r1,r4,r4,LSL #2       ;347
000010  4a03              LDR      r2,|L29.32|
000012  eb020081          ADD      r0,r2,r1,LSL #2       ;347
000016  f7fffffe          BL       platform_pwm_stop
00001a  e7f6              B        |L29.10|
;;;349    
                          ENDP

                  |L29.28|
                          DCD      0xffffe5b1
                  |L29.32|
                          DCD      platform_pwm_peripherals

                          AREA ||i.MicoRandomNumberRead||, CODE, READONLY, ALIGN=1

                  MicoRandomNumberRead PROC
;;;519    
;;;520    OSStatus MicoRandomNumberRead( void *inBuffer, int inByteCount )
000000  b570              PUSH     {r4-r6,lr}
;;;521    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;522      return (OSStatus) platform_random_number_read( inBuffer, inByteCount );
000006  4629              MOV      r1,r5
000008  4620              MOV      r0,r4
00000a  f7fffffe          BL       platform_random_number_read
;;;523    }
00000e  bd70              POP      {r4-r6,pc}
;;;524    
                          ENDP


                          AREA ||i.MicoRtcGetTime||, CODE, READONLY, ALIGN=1

                  MicoRtcGetTime PROC
;;;349    
;;;350    OSStatus MicoRtcGetTime(mico_rtc_time_t* time)
000000  b510              PUSH     {r4,lr}
;;;351    {
000002  4604              MOV      r4,r0
;;;352      return (OSStatus) platform_rtc_get_time( time );
000004  4620              MOV      r0,r4
000006  f7fffffe          BL       platform_rtc_get_time
;;;353    }
00000a  bd10              POP      {r4,pc}
;;;354    
                          ENDP


                          AREA ||i.MicoRtcSetTime||, CODE, READONLY, ALIGN=1

                  MicoRtcSetTime PROC
;;;354    
;;;355    OSStatus MicoRtcSetTime(mico_rtc_time_t* time)
000000  b510              PUSH     {r4,lr}
;;;356    {
000002  4604              MOV      r4,r0
;;;357      return (OSStatus) platform_rtc_set_time( time );
000004  4620              MOV      r0,r4
000006  f7fffffe          BL       platform_rtc_set_time
;;;358    }
00000a  bd10              POP      {r4,pc}
;;;359    
                          ENDP


                          AREA ||i.MicoSpiFinalize||, CODE, READONLY, ALIGN=2

                  MicoSpiFinalize PROC
;;;382    
;;;383    OSStatus MicoSpiFinalize( const mico_spi_device_t* spi )
000000  b570              PUSH     {r4-r6,lr}
;;;384    {
000002  4604              MOV      r4,r0
;;;385      OSStatus err = kNoErr;
000004  2500              MOVS     r5,#0
;;;386    
;;;387      if ( spi->port >= MICO_SPI_NONE )
000006  7820              LDRB     r0,[r4,#0]
000008  2802              CMP      r0,#2
00000a  db01              BLT      |L33.16|
;;;388        return kUnsupportedErr;
00000c  4812              LDR      r0,|L33.88|
                  |L33.14|
;;;389    
;;;390      if( platform_spi_drivers[spi->port].spi_mutex == NULL)
;;;391        mico_rtos_init_mutex( &platform_spi_drivers[spi->port].spi_mutex );
;;;392      
;;;393      mico_rtos_lock_mutex( &platform_spi_drivers[spi->port].spi_mutex );
;;;394      err = platform_spi_deinit( &platform_spi_drivers[spi->port] );
;;;395      mico_rtos_unlock_mutex( &platform_spi_drivers[spi->port].spi_mutex );
;;;396    
;;;397      return err;
;;;398    }
00000e  bd70              POP      {r4-r6,pc}
                  |L33.16|
000010  7820              LDRB     r0,[r4,#0]            ;390
000012  4912              LDR      r1,|L33.92|
000014  eb0100c0          ADD      r0,r1,r0,LSL #3       ;390
000018  6840              LDR      r0,[r0,#4]            ;390
00001a  b930              CBNZ     r0,|L33.42|
00001c  7821              LDRB     r1,[r4,#0]            ;391
00001e  4a0f              LDR      r2,|L33.92|
000020  eb0201c1          ADD      r1,r2,r1,LSL #3       ;391
000024  1d08              ADDS     r0,r1,#4              ;391
000026  f7fffffe          BL       mico_rtos_init_mutex
                  |L33.42|
00002a  7821              LDRB     r1,[r4,#0]            ;393
00002c  4a0b              LDR      r2,|L33.92|
00002e  eb0201c1          ADD      r1,r2,r1,LSL #3       ;393
000032  1d08              ADDS     r0,r1,#4              ;393
000034  f7fffffe          BL       mico_rtos_lock_mutex
000038  7821              LDRB     r1,[r4,#0]            ;394
00003a  4a08              LDR      r2,|L33.92|
00003c  eb0200c1          ADD      r0,r2,r1,LSL #3       ;394
000040  f7fffffe          BL       platform_spi_deinit
000044  4605              MOV      r5,r0                 ;394
000046  7821              LDRB     r1,[r4,#0]            ;395
000048  4a04              LDR      r2,|L33.92|
00004a  eb0201c1          ADD      r1,r2,r1,LSL #3       ;395
00004e  1d08              ADDS     r0,r1,#4              ;395
000050  f7fffffe          BL       mico_rtos_unlock_mutex
000054  4628              MOV      r0,r5                 ;397
000056  e7da              B        |L33.14|
;;;399    
                          ENDP

                  |L33.88|
                          DCD      0xffffe5b1
                  |L33.92|
                          DCD      platform_spi_drivers

                          AREA ||i.MicoSpiInitialize||, CODE, READONLY, ALIGN=2

                  MicoSpiInitialize PROC
;;;359    
;;;360    OSStatus MicoSpiInitialize( const mico_spi_device_t* spi )
000000  b53e              PUSH     {r1-r5,lr}
;;;361    {
000002  4604              MOV      r4,r0
;;;362      platform_spi_config_t config;
;;;363      OSStatus              err = kNoErr;
000004  2500              MOVS     r5,#0
;;;364    
;;;365      if ( spi->port >= MICO_SPI_NONE )
000006  7820              LDRB     r0,[r4,#0]
000008  2802              CMP      r0,#2
00000a  db01              BLT      |L34.16|
;;;366        return kUnsupportedErr;
00000c  481d              LDR      r0,|L34.132|
                  |L34.14|
;;;367    
;;;368      if( platform_spi_drivers[spi->port].spi_mutex == NULL)
;;;369        mico_rtos_init_mutex( &platform_spi_drivers[spi->port].spi_mutex );
;;;370      
;;;371      config.chip_select = &platform_gpio_pins[spi->chip_select];
;;;372      config.speed       = spi->speed;
;;;373      config.mode        = spi->mode;
;;;374      config.bits        = spi->bits;
;;;375      
;;;376      mico_rtos_lock_mutex( &platform_spi_drivers[spi->port].spi_mutex );
;;;377      err = platform_spi_init( &platform_spi_drivers[spi->port], &platform_spi_peripherals[spi->port], &config );
;;;378      mico_rtos_unlock_mutex( &platform_spi_drivers[spi->port].spi_mutex );
;;;379    
;;;380      return err;
;;;381    }
00000e  bd3e              POP      {r1-r5,pc}
                  |L34.16|
000010  7820              LDRB     r0,[r4,#0]            ;368
000012  491d              LDR      r1,|L34.136|
000014  eb0100c0          ADD      r0,r1,r0,LSL #3       ;368
000018  6840              LDR      r0,[r0,#4]            ;368
00001a  b930              CBNZ     r0,|L34.42|
00001c  7821              LDRB     r1,[r4,#0]            ;369
00001e  4a1a              LDR      r2,|L34.136|
000020  eb0201c1          ADD      r1,r2,r1,LSL #3       ;369
000024  1d08              ADDS     r0,r1,#4              ;369
000026  f7fffffe          BL       mico_rtos_init_mutex
                  |L34.42|
00002a  7860              LDRB     r0,[r4,#1]            ;371
00002c  4917              LDR      r1,|L34.140|
00002e  eb0100c0          ADD      r0,r1,r0,LSL #3       ;371
000032  9002              STR      r0,[sp,#8]            ;371
000034  6860              LDR      r0,[r4,#4]            ;372
000036  9000              STR      r0,[sp,#0]            ;372
000038  7a20              LDRB     r0,[r4,#8]            ;373
00003a  f88d0004          STRB     r0,[sp,#4]            ;373
00003e  7a60              LDRB     r0,[r4,#9]            ;374
000040  f88d0005          STRB     r0,[sp,#5]            ;374
000044  7821              LDRB     r1,[r4,#0]            ;376
000046  4a10              LDR      r2,|L34.136|
000048  eb0201c1          ADD      r1,r2,r1,LSL #3       ;376
00004c  1d08              ADDS     r0,r1,#4              ;376
00004e  f7fffffe          BL       mico_rtos_lock_mutex
000052  7822              LDRB     r2,[r4,#0]            ;377
000054  eb020342          ADD      r3,r2,r2,LSL #1       ;377
000058  eb031202          ADD      r2,r3,r2,LSL #4       ;377
00005c  4b0c              LDR      r3,|L34.144|
00005e  eb030182          ADD      r1,r3,r2,LSL #2       ;377
000062  7822              LDRB     r2,[r4,#0]            ;377
000064  4b08              LDR      r3,|L34.136|
000066  eb0300c2          ADD      r0,r3,r2,LSL #3       ;377
00006a  466a              MOV      r2,sp                 ;377
00006c  f7fffffe          BL       platform_spi_init
000070  4605              MOV      r5,r0                 ;377
000072  7821              LDRB     r1,[r4,#0]            ;378
000074  4a04              LDR      r2,|L34.136|
000076  eb0201c1          ADD      r1,r2,r1,LSL #3       ;378
00007a  1d08              ADDS     r0,r1,#4              ;378
00007c  f7fffffe          BL       mico_rtos_unlock_mutex
000080  4628              MOV      r0,r5                 ;380
000082  e7c4              B        |L34.14|
;;;382    
                          ENDP

                  |L34.132|
                          DCD      0xffffe5b1
                  |L34.136|
                          DCD      platform_spi_drivers
                  |L34.140|
                          DCD      platform_gpio_pins
                  |L34.144|
                          DCD      platform_spi_peripherals

                          AREA ||i.MicoSpiSlaveFinalize||, CODE, READONLY, ALIGN=2

                  MicoSpiSlaveFinalize PROC
;;;431    
;;;432    OSStatus MicoSpiSlaveFinalize( mico_spi_t spi )
000000  b510              PUSH     {r4,lr}
;;;433    {
000002  4604              MOV      r4,r0
;;;434      if ( spi >= MICO_SPI_NONE )
000004  2c02              CMP      r4,#2
000006  db01              BLT      |L35.12|
;;;435        return kUnsupportedErr;
000008  4803              LDR      r0,|L35.24|
                  |L35.10|
;;;436    
;;;437      return (OSStatus) platform_spi_slave_deinit( &platform_spi_slave_drivers[spi] );
;;;438    }
00000a  bd10              POP      {r4,pc}
                  |L35.12|
00000c  4903              LDR      r1,|L35.28|
00000e  1908              ADDS     r0,r1,r4              ;437
000010  f7fffffe          BL       platform_spi_slave_deinit
000014  e7f9              B        |L35.10|
;;;439    
                          ENDP

000016  0000              DCW      0x0000
                  |L35.24|
                          DCD      0xffffe5b1
                  |L35.28|
                          DCD      platform_spi_slave_drivers

                          AREA ||i.MicoSpiSlaveGenerateInterrupt||, CODE, READONLY, ALIGN=2

                  MicoSpiSlaveGenerateInterrupt PROC
;;;463    
;;;464    OSStatus MicoSpiSlaveGenerateInterrupt( mico_spi_t spi, uint32_t pulse_duration_ms )
000000  b570              PUSH     {r4-r6,lr}
;;;465    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;466      if ( spi >= MICO_SPI_NONE )
000006  2c02              CMP      r4,#2
000008  db01              BLT      |L36.14|
;;;467        return kUnsupportedErr;
00000a  4804              LDR      r0,|L36.28|
                  |L36.12|
;;;468    
;;;469      return (OSStatus) platform_spi_slave_generate_interrupt( &platform_spi_slave_drivers[spi], pulse_duration_ms );
;;;470    }
00000c  bd70              POP      {r4-r6,pc}
                  |L36.14|
00000e  4904              LDR      r1,|L36.32|
000010  1908              ADDS     r0,r1,r4              ;469
000012  4629              MOV      r1,r5                 ;469
000014  f7fffffe          BL       platform_spi_slave_generate_interrupt
000018  e7f8              B        |L36.12|
;;;471    
                          ENDP

00001a  0000              DCW      0x0000
                  |L36.28|
                          DCD      0xffffe5b1
                  |L36.32|
                          DCD      platform_spi_slave_drivers

                          AREA ||i.MicoSpiSlaveInitialize||, CODE, READONLY, ALIGN=2

                  MicoSpiSlaveInitialize PROC
;;;423    
;;;424    OSStatus MicoSpiSlaveInitialize( mico_spi_t spi, const mico_spi_slave_config_t* config )
000000  b570              PUSH     {r4-r6,lr}
;;;425    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;426      if ( spi >= MICO_SPI_NONE )
000006  2c02              CMP      r4,#2
000008  db01              BLT      |L37.14|
;;;427        return kUnsupportedErr;
00000a  4807              LDR      r0,|L37.40|
                  |L37.12|
;;;428    
;;;429      return (OSStatus) platform_spi_slave_init( &platform_spi_slave_drivers[spi], &platform_spi_peripherals[spi], config );
;;;430    }
00000c  bd70              POP      {r4-r6,pc}
                  |L37.14|
00000e  eb040244          ADD      r2,r4,r4,LSL #1       ;429
000012  eb021204          ADD      r2,r2,r4,LSL #4       ;429
000016  4b05              LDR      r3,|L37.44|
000018  eb030182          ADD      r1,r3,r2,LSL #2       ;429
00001c  4a04              LDR      r2,|L37.48|
00001e  1910              ADDS     r0,r2,r4              ;429
000020  462a              MOV      r2,r5                 ;429
000022  f7fffffe          BL       platform_spi_slave_init
000026  e7f1              B        |L37.12|
;;;431    
                          ENDP

                  |L37.40|
                          DCD      0xffffe5b1
                  |L37.44|
                          DCD      platform_spi_peripherals
                  |L37.48|
                          DCD      platform_spi_slave_drivers

                          AREA ||i.MicoSpiSlaveReceiveCommand||, CODE, READONLY, ALIGN=2

                  MicoSpiSlaveReceiveCommand PROC
;;;447    
;;;448    OSStatus MicoSpiSlaveReceiveCommand( mico_spi_t spi, mico_spi_slave_command_t* command, uint32_t timeout_ms )
000000  b570              PUSH     {r4-r6,lr}
;;;449    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
000006  4616              MOV      r6,r2
;;;450      if ( spi >= MICO_SPI_NONE )
000008  2c02              CMP      r4,#2
00000a  db01              BLT      |L38.16|
;;;451        return kUnsupportedErr;  
00000c  4804              LDR      r0,|L38.32|
                  |L38.14|
;;;452    
;;;453      return (OSStatus) platform_spi_slave_receive_command( &platform_spi_slave_drivers[spi], command, timeout_ms );
;;;454    }
00000e  bd70              POP      {r4-r6,pc}
                  |L38.16|
000010  4904              LDR      r1,|L38.36|
000012  1908              ADDS     r0,r1,r4              ;453
000014  4632              MOV      r2,r6                 ;453
000016  4629              MOV      r1,r5                 ;453
000018  f7fffffe          BL       platform_spi_slave_receive_command
00001c  e7f7              B        |L38.14|
;;;455    
                          ENDP

00001e  0000              DCW      0x0000
                  |L38.32|
                          DCD      0xffffe5b1
                  |L38.36|
                          DCD      platform_spi_slave_drivers

                          AREA ||i.MicoSpiSlaveSendErrorStatus||, CODE, READONLY, ALIGN=2

                  MicoSpiSlaveSendErrorStatus PROC
;;;439    
;;;440    OSStatus  MicoSpiSlaveSendErrorStatus( mico_spi_t spi, mico_spi_slave_transfer_status_t error_status )
000000  b570              PUSH     {r4-r6,lr}
;;;441    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
;;;442      if ( spi >= MICO_SPI_NONE )
000006  2c02              CMP      r4,#2
000008  db01              BLT      |L39.14|
;;;443        return kUnsupportedErr;
00000a  4804              LDR      r0,|L39.28|
                  |L39.12|
;;;444    
;;;445      return (OSStatus) platform_spi_slave_send_error_status( &platform_spi_slave_drivers[spi], error_status );
;;;446    }
00000c  bd70              POP      {r4-r6,pc}
                  |L39.14|
00000e  4904              LDR      r1,|L39.32|
000010  1908              ADDS     r0,r1,r4              ;445
000012  4629              MOV      r1,r5                 ;445
000014  f7fffffe          BL       platform_spi_slave_send_error_status
000018  e7f8              B        |L39.12|
;;;447    
                          ENDP

00001a  0000              DCW      0x0000
                  |L39.28|
                          DCD      0xffffe5b1
                  |L39.32|
                          DCD      platform_spi_slave_drivers

                          AREA ||i.MicoSpiSlaveTransferData||, CODE, READONLY, ALIGN=2

                  MicoSpiSlaveTransferData PROC
;;;455    
;;;456    OSStatus MicoSpiSlaveTransferData( mico_spi_t spi, mico_spi_slave_transfer_direction_t direction, mico_spi_slave_data_buffer_t* buffer, uint32_t timeout_ms )
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;457    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
00000a  461f              MOV      r7,r3
;;;458      if ( spi >= MICO_SPI_NONE )
00000c  2c02              CMP      r4,#2
00000e  db02              BLT      |L40.22|
;;;459        return kUnsupportedErr;  
000010  4805              LDR      r0,|L40.40|
                  |L40.18|
;;;460    
;;;461      return (OSStatus) platform_spi_slave_transfer_data( &platform_spi_slave_drivers[spi], direction, buffer, timeout_ms );
;;;462    }
000012  e8bd81f0          POP      {r4-r8,pc}
                  |L40.22|
000016  4905              LDR      r1,|L40.44|
000018  1908              ADDS     r0,r1,r4              ;461
00001a  463b              MOV      r3,r7                 ;461
00001c  4632              MOV      r2,r6                 ;461
00001e  4629              MOV      r1,r5                 ;461
000020  f7fffffe          BL       platform_spi_slave_transfer_data
000024  e7f5              B        |L40.18|
;;;463    
                          ENDP

000026  0000              DCW      0x0000
                  |L40.40|
                          DCD      0xffffe5b1
                  |L40.44|
                          DCD      platform_spi_slave_drivers

                          AREA ||i.MicoSpiTransfer||, CODE, READONLY, ALIGN=2

                  MicoSpiTransfer PROC
;;;399    
;;;400    OSStatus MicoSpiTransfer( const mico_spi_device_t* spi, const mico_spi_message_segment_t* segments, uint16_t number_of_segments )
000000  b5fe              PUSH     {r1-r7,lr}
;;;401    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
000006  4616              MOV      r6,r2
;;;402      platform_spi_config_t config;
;;;403      OSStatus err = kNoErr;
000008  2700              MOVS     r7,#0
;;;404    
;;;405      if ( spi->port >= MICO_SPI_NONE )
00000a  7820              LDRB     r0,[r4,#0]
00000c  2802              CMP      r0,#2
00000e  db01              BLT      |L41.20|
;;;406        return kUnsupportedErr;
000010  4822              LDR      r0,|L41.156|
                  |L41.18|
;;;407      
;;;408      if( platform_spi_drivers[spi->port].spi_mutex == NULL)
;;;409        mico_rtos_init_mutex( &platform_spi_drivers[spi->port].spi_mutex );
;;;410      
;;;411      config.chip_select = &platform_gpio_pins[spi->chip_select];
;;;412      config.speed       = spi->speed;
;;;413      config.mode        = spi->mode;
;;;414      config.bits        = spi->bits;
;;;415      
;;;416      mico_rtos_lock_mutex( &platform_spi_drivers[spi->port].spi_mutex );
;;;417      err = platform_spi_init( &platform_spi_drivers[spi->port], &platform_spi_peripherals[spi->port], &config );
;;;418      err = platform_spi_transfer( &platform_spi_drivers[spi->port], &config, segments, number_of_segments );
;;;419      mico_rtos_unlock_mutex( &platform_spi_drivers[spi->port].spi_mutex );
;;;420    
;;;421      return err;
;;;422    }
000012  bdfe              POP      {r1-r7,pc}
                  |L41.20|
000014  7820              LDRB     r0,[r4,#0]            ;408
000016  4922              LDR      r1,|L41.160|
000018  eb0100c0          ADD      r0,r1,r0,LSL #3       ;408
00001c  6840              LDR      r0,[r0,#4]            ;408
00001e  b930              CBNZ     r0,|L41.46|
000020  7821              LDRB     r1,[r4,#0]            ;409
000022  4a1f              LDR      r2,|L41.160|
000024  eb0201c1          ADD      r1,r2,r1,LSL #3       ;409
000028  1d08              ADDS     r0,r1,#4              ;409
00002a  f7fffffe          BL       mico_rtos_init_mutex
                  |L41.46|
00002e  7860              LDRB     r0,[r4,#1]            ;411
000030  491c              LDR      r1,|L41.164|
000032  eb0100c0          ADD      r0,r1,r0,LSL #3       ;411
000036  9002              STR      r0,[sp,#8]            ;411
000038  6860              LDR      r0,[r4,#4]            ;412
00003a  9000              STR      r0,[sp,#0]            ;412
00003c  7a20              LDRB     r0,[r4,#8]            ;413
00003e  f88d0004          STRB     r0,[sp,#4]            ;413
000042  7a60              LDRB     r0,[r4,#9]            ;414
000044  f88d0005          STRB     r0,[sp,#5]            ;414
000048  7821              LDRB     r1,[r4,#0]            ;416
00004a  4a15              LDR      r2,|L41.160|
00004c  eb0201c1          ADD      r1,r2,r1,LSL #3       ;416
000050  1d08              ADDS     r0,r1,#4              ;416
000052  f7fffffe          BL       mico_rtos_lock_mutex
000056  7822              LDRB     r2,[r4,#0]            ;417
000058  eb020342          ADD      r3,r2,r2,LSL #1       ;417
00005c  eb031202          ADD      r2,r3,r2,LSL #4       ;417
000060  4b11              LDR      r3,|L41.168|
000062  eb030182          ADD      r1,r3,r2,LSL #2       ;417
000066  7822              LDRB     r2,[r4,#0]            ;417
000068  4b0d              LDR      r3,|L41.160|
00006a  eb0300c2          ADD      r0,r3,r2,LSL #3       ;417
00006e  466a              MOV      r2,sp                 ;417
000070  f7fffffe          BL       platform_spi_init
000074  7821              LDRB     r1,[r4,#0]            ;418
000076  4a0a              LDR      r2,|L41.160|
000078  eb0200c1          ADD      r0,r2,r1,LSL #3       ;418
00007c  4633              MOV      r3,r6                 ;418
00007e  462a              MOV      r2,r5                 ;418
000080  4669              MOV      r1,sp                 ;418
000082  f7fffffe          BL       platform_spi_transfer
000086  4607              MOV      r7,r0                 ;418
000088  7821              LDRB     r1,[r4,#0]            ;419
00008a  4a05              LDR      r2,|L41.160|
00008c  eb0201c1          ADD      r1,r2,r1,LSL #3       ;419
000090  1d08              ADDS     r0,r1,#4              ;419
000092  f7fffffe          BL       mico_rtos_unlock_mutex
000096  4638              MOV      r0,r7                 ;421
000098  e7bb              B        |L41.18|
;;;423    
                          ENDP

00009a  0000              DCW      0x0000
                  |L41.156|
                          DCD      0xffffe5b1
                  |L41.160|
                          DCD      platform_spi_drivers
                  |L41.164|
                          DCD      platform_gpio_pins
                  |L41.168|
                          DCD      platform_spi_peripherals

                          AREA ||i.MicoSystemReboot||, CODE, READONLY, ALIGN=1

                  MicoSystemReboot PROC
;;;524    
;;;525    void MicoSystemReboot( void )
000000  b510              PUSH     {r4,lr}
;;;526    {
;;;527      platform_mcu_reset();
000002  f7fffffe          BL       platform_mcu_reset
;;;528    }
000006  bd10              POP      {r4,pc}
;;;529    OSStatus MicoWdgInitialize( uint32_t timeout )
                          ENDP


                          AREA ||i.MicoSystemStandBy||, CODE, READONLY, ALIGN=1

                  MicoSystemStandBy PROC
;;;322    
;;;323    void MicoSystemStandBy( uint32_t secondsToWakeup )
000000  b510              PUSH     {r4,lr}
;;;324    {
000002  4604              MOV      r4,r0
;;;325      platform_mcu_enter_standby( secondsToWakeup );
000004  4620              MOV      r0,r4
000006  f7fffffe          BL       platform_mcu_enter_standby
;;;326    }
00000a  bd10              POP      {r4,pc}
;;;327    
                          ENDP


                          AREA ||i.MicoUartFinalize||, CODE, READONLY, ALIGN=2

                  MicoUartFinalize PROC
;;;487    
;;;488    OSStatus MicoUartFinalize( mico_uart_t uart )
000000  b510              PUSH     {r4,lr}
;;;489    {
000002  4604              MOV      r4,r0
;;;490      if ( uart >= MICO_UART_NONE )
000004  2c02              CMP      r4,#2
000006  db01              BLT      |L44.12|
;;;491        return kUnsupportedErr;
000008  4804              LDR      r0,|L44.28|
                  |L44.10|
;;;492    
;;;493      return (OSStatus) platform_uart_deinit( &platform_uart_drivers[uart] );
;;;494    }
00000a  bd10              POP      {r4,pc}
                  |L44.12|
00000c  eb040184          ADD      r1,r4,r4,LSL #2       ;493
000010  4a03              LDR      r2,|L44.32|
000012  eb0200c1          ADD      r0,r2,r1,LSL #3       ;493
000016  f7fffffe          BL       platform_uart_deinit
00001a  e7f6              B        |L44.10|
;;;495    
                          ENDP

                  |L44.28|
                          DCD      0xffffe5b1
                  |L44.32|
                          DCD      platform_uart_drivers

                          AREA ||i.MicoUartGetLengthInBuffer||, CODE, READONLY, ALIGN=2

                  MicoUartGetLengthInBuffer PROC
;;;511    
;;;512    uint32_t MicoUartGetLengthInBuffer( mico_uart_t uart )
000000  b510              PUSH     {r4,lr}
;;;513    {
000002  4604              MOV      r4,r0
;;;514      if ( uart >= MICO_UART_NONE )
000004  2c02              CMP      r4,#2
000006  db01              BLT      |L45.12|
;;;515        return 0;
000008  2000              MOVS     r0,#0
                  |L45.10|
;;;516      
;;;517      return (OSStatus) platform_uart_get_length_in_buffer( &platform_uart_drivers[uart] );
;;;518    }
00000a  bd10              POP      {r4,pc}
                  |L45.12|
00000c  eb040184          ADD      r1,r4,r4,LSL #2       ;517
000010  4a02              LDR      r2,|L45.28|
000012  eb0200c1          ADD      r0,r2,r1,LSL #3       ;517
000016  f7fffffe          BL       platform_uart_get_length_in_buffer
00001a  e7f6              B        |L45.10|
;;;519    
                          ENDP

                  |L45.28|
                          DCD      platform_uart_drivers

                          AREA ||i.MicoUartInitialize||, CODE, READONLY, ALIGN=2

                  MicoUartInitialize PROC
;;;471    
;;;472    OSStatus MicoUartInitialize( mico_uart_t uart, const mico_uart_config_t* config, ring_buffer_t* optional_rx_buffer )
000000  b570              PUSH     {r4-r6,lr}
;;;473    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
000006  4616              MOV      r6,r2
;;;474      if ( uart >= MICO_UART_NONE )
000008  2c02              CMP      r4,#2
00000a  db01              BLT      |L46.16|
;;;475        return kUnsupportedErr;
00000c  480a              LDR      r0,|L46.56|
                  |L46.14|
;;;476    
;;;477    #ifndef MICO_DISABLE_STDIO
;;;478      /* Interface is used by STDIO. Uncomment MICO_DISABLE_STDIO to overcome this */
;;;479      if ( uart == STDIO_UART )
;;;480      {
;;;481        return kGeneralErr;
;;;482      }
;;;483    #endif
;;;484      
;;;485      return (OSStatus) platform_uart_init( &platform_uart_drivers[uart], &platform_uart_peripherals[uart], config, optional_rx_buffer );
;;;486    }
00000e  bd70              POP      {r4-r6,pc}
                  |L46.16|
000010  b914              CBNZ     r4,|L46.24|
000012  f04f30ff          MOV      r0,#0xffffffff        ;481
000016  e7fa              B        |L46.14|
                  |L46.24|
000018  eb041204          ADD      r2,r4,r4,LSL #4       ;485
00001c  4b07              LDR      r3,|L46.60|
00001e  eb030182          ADD      r1,r3,r2,LSL #2       ;485
000022  eb040284          ADD      r2,r4,r4,LSL #2       ;485
000026  4b06              LDR      r3,|L46.64|
000028  eb0300c2          ADD      r0,r3,r2,LSL #3       ;485
00002c  4633              MOV      r3,r6                 ;485
00002e  462a              MOV      r2,r5                 ;485
000030  f7fffffe          BL       platform_uart_init
000034  e7eb              B        |L46.14|
;;;487    
                          ENDP

000036  0000              DCW      0x0000
                  |L46.56|
                          DCD      0xffffe5b1
                  |L46.60|
                          DCD      platform_uart_peripherals
                  |L46.64|
                          DCD      platform_uart_drivers

                          AREA ||i.MicoUartRecv||, CODE, READONLY, ALIGN=2

                  MicoUartRecv PROC
;;;503    
;;;504    OSStatus MicoUartRecv( mico_uart_t uart, void* data, uint32_t size, uint32_t timeout )
000000  e92d41f0          PUSH     {r4-r8,lr}
;;;505    {
000004  4604              MOV      r4,r0
000006  460d              MOV      r5,r1
000008  4616              MOV      r6,r2
00000a  461f              MOV      r7,r3
;;;506      if ( uart >= MICO_UART_NONE )
00000c  2c02              CMP      r4,#2
00000e  db02              BLT      |L47.22|
;;;507        return kUnsupportedErr;
000010  4806              LDR      r0,|L47.44|
                  |L47.18|
;;;508    
;;;509      return (OSStatus) platform_uart_receive_bytes( &platform_uart_drivers[uart], (uint8_t*)data, size, timeout );
;;;510    }
000012  e8bd81f0          POP      {r4-r8,pc}
                  |L47.22|
000016  eb040184          ADD      r1,r4,r4,LSL #2       ;509
00001a  4a05              LDR      r2,|L47.48|
00001c  eb0200c1          ADD      r0,r2,r1,LSL #3       ;509
000020  463b              MOV      r3,r7                 ;509
000022  4632              MOV      r2,r6                 ;509
000024  4629              MOV      r1,r5                 ;509
000026  f7fffffe          BL       platform_uart_receive_bytes
00002a  e7f2              B        |L47.18|
;;;511    
                          ENDP

                  |L47.44|
                          DCD      0xffffe5b1
                  |L47.48|
                          DCD      platform_uart_drivers

                          AREA ||i.MicoUartSend||, CODE, READONLY, ALIGN=2

                  MicoUartSend PROC
;;;495    
;;;496    OSStatus MicoUartSend( mico_uart_t uart, const void* data, uint32_t size )
000000  b570              PUSH     {r4-r6,lr}
;;;497    {
000002  4604              MOV      r4,r0
000004  460d              MOV      r5,r1
000006  4616              MOV      r6,r2
;;;498      if ( uart >= MICO_UART_NONE )
000008  2c02              CMP      r4,#2
00000a  db01              BLT      |L48.16|
;;;499        return kUnsupportedErr;
00000c  4805              LDR      r0,|L48.36|
                  |L48.14|
;;;500    
;;;501      return (OSStatus) platform_uart_transmit_bytes( &platform_uart_drivers[uart], (const uint8_t*) data, size );
;;;502    }
00000e  bd70              POP      {r4-r6,pc}
                  |L48.16|
000010  eb040184          ADD      r1,r4,r4,LSL #2       ;501
000014  4a04              LDR      r2,|L48.40|
000016  eb0200c1          ADD      r0,r2,r1,LSL #3       ;501
00001a  4632              MOV      r2,r6                 ;501
00001c  4629              MOV      r1,r5                 ;501
00001e  f7fffffe          BL       platform_uart_transmit_bytes
000022  e7f4              B        |L48.14|
;;;503    
                          ENDP

                  |L48.36|
                          DCD      0xffffe5b1
                  |L48.40|
                          DCD      platform_uart_drivers

                          AREA ||i.MicoWdgInitialize||, CODE, READONLY, ALIGN=1

                  MicoWdgInitialize PROC
;;;528    }
;;;529    OSStatus MicoWdgInitialize( uint32_t timeout )
000000  b510              PUSH     {r4,lr}
;;;530    {
000002  4604              MOV      r4,r0
;;;531        return (OSStatus) platform_watchdog_init( timeout );
000004  4620              MOV      r0,r4
000006  f7fffffe          BL       platform_watchdog_init
;;;532    }
00000a  bd10              POP      {r4,pc}
;;;533    
                          ENDP


                          AREA ||i.MicoWdgReload||, CODE, READONLY, ALIGN=1

                  MicoWdgReload PROC
;;;533    
;;;534    void MicoWdgReload( void )
000000  b510              PUSH     {r4,lr}
;;;535    {
;;;536        platform_watchdog_kick( );
000002  f7fffffe          BL       platform_watchdog_kick
;;;537    }
000006  bd10              POP      {r4,pc}
;;;538    
                          ENDP


                          AREA ||i.mico_get_bootloader_ver||, CODE, READONLY, ALIGN=2

                  mico_get_bootloader_ver PROC
;;;706    
;;;707    char *mico_get_bootloader_ver(void)
000000  b538              PUSH     {r3-r5,lr}
;;;708    {
;;;709        static char ver[33];
;;;710        const mico_logic_partition_t* bootloader_partition = &mico_partitions[ MICO_PARTITION_BOOTLOADER ];
000002  4c08              LDR      r4,|L51.36|
;;;711        uint32_t version_offset = bootloader_partition->partition_length - 0x20;
000004  68e0              LDR      r0,[r4,#0xc]
000006  3820              SUBS     r0,r0,#0x20
000008  9000              STR      r0,[sp,#0]
;;;712    
;;;713        memset(ver, 0, sizeof(ver));
00000a  2121              MOVS     r1,#0x21
00000c  4806              LDR      r0,|L51.40|
00000e  f7fffffe          BL       __aeabi_memclr
;;;714        MicoFlashRead( MICO_PARTITION_BOOTLOADER, &version_offset, (uint8_t *)ver , 32);
000012  2320              MOVS     r3,#0x20
000014  4a04              LDR      r2,|L51.40|
000016  4669              MOV      r1,sp
000018  2000              MOVS     r0,#0
00001a  f7fffffe          BL       MicoFlashRead
;;;715        return ver;
00001e  4802              LDR      r0,|L51.40|
;;;716    }
000020  bd38              POP      {r3-r5,pc}
;;;717    
                          ENDP

000022  0000              DCW      0x0000
                  |L51.36|
                          DCD      mico_partitions
                  |L51.40|
                          DCD      ver

                          AREA ||i.mico_gpio_input_get||, CODE, READONLY, ALIGN=2

                  mico_gpio_input_get PROC
;;;195    
;;;196    bool MicoGpioInputGet( mico_gpio_t gpio )
000000  b510              PUSH     {r4,lr}
;;;197    {
000002  4604              MOV      r4,r0
;;;198      if ( gpio >= MICO_GPIO_NONE )
000004  2c0d              CMP      r4,#0xd
000006  db01              BLT      |L52.12|
;;;199        return kUnsupportedErr;
000008  2001              MOVS     r0,#1
                  |L52.10|
;;;200      return platform_gpio_input_get( &platform_gpio_pins[gpio] );
;;;201    }
00000a  bd10              POP      {r4,pc}
                  |L52.12|
00000c  4902              LDR      r1,|L52.24|
00000e  eb0100c4          ADD      r0,r1,r4,LSL #3       ;200
000012  f7fffffe          BL       platform_gpio_input_get
000016  e7f8              B        |L52.10|
;;;202    
                          ENDP

                  |L52.24|
                          DCD      platform_gpio_pins

                          AREA ||i.mico_platform_init||, CODE, READONLY, ALIGN=2

                          REQUIRE _printf_pre_padding
                          REQUIRE _printf_percent
                          REQUIRE _printf_widthprec
                          REQUIRE _printf_d
                          REQUIRE _printf_s
                          REQUIRE _printf_int_dec
                          REQUIRE _printf_str
                          REQUIRE _printf_str
                  mico_platform_init PROC
;;;100    
;;;101    OSStatus mico_platform_init( void )
000000  b538              PUSH     {r3-r5,lr}
;;;102    {
;;;103    #if defined(__CC_ARM)
;;;104      platform_log("Platform initialised, build by RVMDK");
000002  bf00              NOP      
000004  4827              LDR      r0,|L53.164|
000006  6800              LDR      r0,[r0,#0]  ; mico_debug_enabled
000008  b900              CBNZ     r0,|L53.12|
00000a  e01e              B        |L53.74|
                  |L53.12|
00000c  4826              LDR      r0,|L53.168|
00000e  f7fffffe          BL       mico_rtos_lock_mutex
000012  215c              MOVS     r1,#0x5c
000014  a025              ADR      r0,|L53.172|
000016  f7fffffe          BL       strrchr
00001a  b128              CBZ      r0,|L53.40|
00001c  215c              MOVS     r1,#0x5c
00001e  a023              ADR      r0,|L53.172|
000020  f7fffffe          BL       strrchr
000024  1c40              ADDS     r0,r0,#1
000026  e000              B        |L53.42|
                  |L53.40|
000028  a020              ADR      r0,|L53.172|
                  |L53.42|
00002a  4604              MOV      r4,r0
00002c  f7fffffe          BL       mico_get_time
000030  4605              MOV      r5,r0
000032  2068              MOVS     r0,#0x68
000034  4623              MOV      r3,r4
000036  a229              ADR      r2,|L53.220|
000038  4629              MOV      r1,r5
00003a  9000              STR      r0,[sp,#0]
00003c  a02a              ADR      r0,|L53.232|
00003e  f7fffffe          BL       __2printf
000042  4819              LDR      r0,|L53.168|
000044  f7fffffe          BL       mico_rtos_unlock_mutex
000048  bf00              NOP      
                  |L53.74|
00004a  bf00              NOP      
;;;105    #elif defined (__IAR_SYSTEMS_ICC__)
;;;106      platform_log("Platform initialised, build by IAR");
;;;107    #endif
;;;108      
;;;109      if ( true == platform_watchdog_check_last_reset() )
00004c  f7fffffe          BL       platform_watchdog_check_last_reset
000050  2800              CMP      r0,#0
000052  d024              BEQ      |L53.158|
;;;110      {
;;;111        platform_log( "WARNING: Watchdog reset occured previously. Please see platform_watchdog.c for debugging instructions." );
000054  bf00              NOP      
000056  4813              LDR      r0,|L53.164|
000058  6800              LDR      r0,[r0,#0]  ; mico_debug_enabled
00005a  b900              CBNZ     r0,|L53.94|
00005c  e01e              B        |L53.156|
                  |L53.94|
00005e  4812              LDR      r0,|L53.168|
000060  f7fffffe          BL       mico_rtos_lock_mutex
000064  215c              MOVS     r1,#0x5c
000066  a011              ADR      r0,|L53.172|
000068  f7fffffe          BL       strrchr
00006c  b128              CBZ      r0,|L53.122|
00006e  215c              MOVS     r1,#0x5c
000070  a00e              ADR      r0,|L53.172|
000072  f7fffffe          BL       strrchr
000076  1c40              ADDS     r0,r0,#1
000078  e000              B        |L53.124|
                  |L53.122|
00007a  a00c              ADR      r0,|L53.172|
                  |L53.124|
00007c  4604              MOV      r4,r0
00007e  f7fffffe          BL       mico_get_time
000082  4605              MOV      r5,r0
000084  206f              MOVS     r0,#0x6f
000086  4623              MOV      r3,r4
000088  a214              ADR      r2,|L53.220|
00008a  4629              MOV      r1,r5
00008c  9000              STR      r0,[sp,#0]
00008e  4824              LDR      r0,|L53.288|
000090  f7fffffe          BL       __2printf
000094  4804              LDR      r0,|L53.168|
000096  f7fffffe          BL       mico_rtos_unlock_mutex
00009a  bf00              NOP      
                  |L53.156|
00009c  bf00              NOP      
                  |L53.158|
;;;112      }
;;;113    
;;;114    #ifdef USES_RESOURCE_FILESYSTEM
;;;115      platform_filesystem_init();
;;;116    #endif
;;;117     
;;;118    #ifndef BOOTLOADER
;;;119      
;;;120    #ifdef USE_MiCOKit_EXT
;;;121      micokit_ext_init();
;;;122    #endif
;;;123      
;;;124    #ifdef USE_MiCOKit_STMEMS
;;;125      micokit_STmems_init();
;;;126    #endif
;;;127      
;;;128    #endif
;;;129      
;;;130      return kNoErr;
00009e  2000              MOVS     r0,#0
;;;131    }
0000a0  bd38              POP      {r3-r5,pc}
;;;132    
                          ENDP

0000a2  0000              DCW      0x0000
                  |L53.164|
                          DCD      mico_debug_enabled
                  |L53.168|
                          DCD      stdio_tx_mutex
                  |L53.172|
0000ac  2e2e5c2e          DCB      "..\\..\\..\\..\\Platform\\MCU\\mico_platform_common.c",0
0000b0  2e5c2e2e
0000b4  5c2e2e5c
0000b8  506c6174
0000bc  666f726d
0000c0  5c4d4355
0000c4  5c6d6963
0000c8  6f5f706c
0000cc  6174666f
0000d0  726d5f63
0000d4  6f6d6d6f
0000d8  6e2e6300
                  |L53.220|
0000dc  506c6174          DCB      "Platform",0
0000e0  666f726d
0000e4  00      
0000e5  00                DCB      0
0000e6  00                DCB      0
0000e7  00                DCB      0
                  |L53.232|
0000e8  5b25645d          DCB      "[%d][%s: %s:%4d] Platform initialised, build by RVMDK\r"
0000ec  5b25733a
0000f0  2025733a
0000f4  2534645d
0000f8  20506c61
0000fc  74666f72
000100  6d20696e
000104  69746961
000108  6c697365
00010c  642c2062
000110  75696c64
000114  20627920
000118  52564d44
00011c  4b0d    
00011e  0a00              DCB      "\n",0
                  |L53.288|
                          DCD      ||.conststring||

                          AREA ||.bss||, DATA, NOINIT, ALIGN=0

                  ver
                          %        33

                          AREA ||.constdata||, DATA, READONLY, ALIGN=0

                  __PRETTY_FUNCTION__
000000  7369676e          DCB      0x73,0x69,0x67,0x6e
000004  65642069          DCB      0x65,0x64,0x20,0x69
000008  6e74204d          DCB      0x6e,0x74,0x20,0x4d
00000c  69636f46          DCB      0x69,0x63,0x6f,0x46
000010  6c617368          DCB      0x6c,0x61,0x73,0x68
000014  496e6974          DCB      0x49,0x6e,0x69,0x74
000018  69616c69          DCB      0x69,0x61,0x6c,0x69
00001c  7a652865          DCB      0x7a,0x65,0x28,0x65
000020  6e756d20          DCB      0x6e,0x75,0x6d,0x20
000024  3c756e6e          DCB      0x3c,0x75,0x6e,0x6e
000028  616d6564          DCB      0x61,0x6d,0x65,0x64
00002c  3e2900            DCB      0x3e,0x29,0x00

                          AREA ||.conststring||, DATA, READONLY, MERGE=1, STRINGS, ALIGN=2

000000  5b25645d          DCB      "[%d][%s: %s:%4d] WARNING: Watchdog reset occured previo"
000004  5b25733a
000008  2025733a
00000c  2534645d
000010  20574152
000014  4e494e47
000018  3a205761
00001c  74636864
000020  6f672072
000024  65736574
000028  206f6363
00002c  75726564
000030  20707265
000034  76696f  
000037  75736c79          DCB      "usly. Please see platform_watchdog.c for debugging inst"
00003b  2e20506c
00003f  65617365
000043  20736565
000047  20706c61
00004b  74666f72
00004f  6d5f7761
000053  74636864
000057  6f672e63
00005b  20666f72
00005f  20646562
000063  75676769
000067  6e672069
00006b  6e7374  
00006e  72756374          DCB      "ructions.\r\n",0
000072  696f6e73
000076  2e0d0a00

;*** Start embedded assembler ***

#line 1 "..\\..\\..\\..\\Platform\\MCU\\mico_platform_common.c"
	AREA ||.rev16_text||, CODE
	THUMB
	EXPORT |__asm___22_mico_platform_common_c_5b801e9f____REV16|
#line 114 "..\\..\\..\\..\\Platform\\Cortex-M4\\CMSIS\\core_cmInstr.h"
|__asm___22_mico_platform_common_c_5b801e9f____REV16| PROC
#line 115

 rev16 r0, r0
 bx lr
	ENDP
	AREA ||.revsh_text||, CODE
	THUMB
	EXPORT |__asm___22_mico_platform_common_c_5b801e9f____REVSH|
#line 128
|__asm___22_mico_platform_common_c_5b801e9f____REVSH| PROC
#line 129

 revsh r0, r0
 bx lr
	ENDP

;*** End   embedded assembler ***
