[修改] 增加freeRTOS

1. 版本FreeRTOSv202212.01,命名为kernel;
This commit is contained in:
2023-05-06 16:43:01 +00:00
commit a345df017b
20944 changed files with 11094377 additions and 0 deletions

View File

@ -0,0 +1,22 @@
@startuml
Title FreeRTOS Cellular Library URC handler implementation
participant Application
participant Cellular_modules_porting
participant Cellular_common
participant Cellular_modem
note over Cellular_modules_porting : Create variable CellularUrcHandlerTable\n\nCellularAtParseTokenMap_t CellularUrcHandlerTable[] =\n{\n { "CEREG", Cellular_CommonUrcProcessCereg },\n { "CGREG", Cellular_CommonUrcProcessCgreg },\n { "CREG", Cellular_CommonUrcProcessCreg },\n { "NORMAL POWER DOWN", _Cellular_ProcessPowerDown }\n}\nuint32_t CellularUrcHandlerTableSize = 4;
Cellular_modem ->Cellular_common : "NORMAL POWER DOWN"
Cellular_common -> Cellular_modules_porting : Call the callback function\n_Cellular_ProcessPowerDown( pContext, "NORMAL POWER DOWN" )
Cellular_modules_porting ->Application : Call the callback function registered in\nCellular_RegisterModemEventCallback()
Cellular_modem ->Cellular_common : "+CREG: 2,0"
Cellular_common -> Cellular_common : Call the callback function\nCellular_CommonUrcProcessCreg( pContext, "+CREG: 2,0" )
Cellular_common->Application : callback function registered in\nCellular_RegisterUrcNetworkRegistrationEventCallback()
@enduml

View File

@ -0,0 +1,31 @@
@startuml
Title FreeRTOS Cellular Library API implementation
participant Application
participant "FreeRTOS Cellular Library"
participant Cellular_modules_porting
participant Cellular_common
participant Cellular_modem
Application ->"FreeRTOS Cellular Library" : Cellular_GetSimCardStatus()
"FreeRTOS Cellular Library"->Cellular_modules_porting :Cellular_GetSimCardStatus()
Cellular_modules_porting->Cellular_common:Get module context passed in Cellular_ModuleInt() :\n_Cellular_GetModuleContext()
Cellular_modules_porting->Cellular_modules_porting:Setup AT commnand request:\nCellularAtReq_t = \n{\n pAtCmd = "AT+QSIMSTAT?"\n atCmdType = CELLULAR_AT_WITH_PREFIX\n pAtRspPrefix = "+QSIMSTAT"\n respCallback = _Cellular_RecvFuncGetSimCardStatus\n pData = &simCardState\n dataLen = sizeof( CellularSimCardState_t )\n};\n
Cellular_modules_porting->Cellular_common:Send AT command with cellular common APIs:\n _Cellular_AtcmdRequestWithCallback( CellularAtReq_t )
Cellular_common ->Cellular_modem : AT+QSIMSTAT?
Cellular_modem -> Cellular_common : +QSIMSTAT: ....
Cellular_modem -> Cellular_common : OK
Cellular_common ->Cellular_modules_porting : Call the callback function with corresponding data field \n_Cellular_RecvFuncGetSimCardStatus( pData, dataLen )
Cellular_modules_porting ->Application : Return parsing status and data
@enduml

View File

@ -0,0 +1,35 @@
@startuml
Title FreeRTOS Cellular Library interaction with cellular module porting APIs
participant Application
participant "FreeRTOS Cellular Library"
participant Cellular_common
participant Cellular_modules_porting
Application ->"FreeRTOS Cellular Library" : Cellular_Init()
"FreeRTOS Cellular Library" -> Cellular_common : Cellular_CommonInit()
Cellular_common -> Cellular_modules_porting : Cellular_moduleInit()
Cellular_common -> Cellular_modules_porting : Cellular_moduleEnableUE()
Cellular_common -> Cellular_modules_porting : Cellular_moduleEnableUrc
Cellular_common --> "FreeRTOS Cellular Library" :
"FreeRTOS Cellular Library" --> Application :
Application ->"FreeRTOS Cellular Library" : Cellular_CleanUp()
"FreeRTOS Cellular Library" -> Cellular_common : Cellular_CommonCleanUp()
Cellular_common -> Cellular_modules_porting : Cellular_moduleCleanUp()
Cellular_common --> "FreeRTOS Cellular Library" :
"FreeRTOS Cellular Library" --> Application :
@enduml

View File

@ -0,0 +1,74 @@
@startuml
Title FreeRTOS Cellular Library interaction with com interface
participant Application
participant "FreeRTOS Cellular Library"
participant cellular_comm_interface
participant cellular_modem
note over Application : Application needs cellular connecitvity.\nCellular_Init() is called to open FreeRTOS \nCellular Library. Communication interface\n, pCommInterface, is provided by\napplication to "FreeRTOS Cellular Library".
Application -> "FreeRTOS Cellular Library" : Cellular_Init( pCommInterface )
activate Application
"FreeRTOS Cellular Library" ->cellular_comm_interface : pCommInterface->Open( receiveCallback )
cellular_comm_interface->cellular_modem : Register receive callback\nOpen and setup communication device driver\nPower on and enable device
cellular_comm_interface-->"FreeRTOS Cellular Library":
"FreeRTOS Cellular Library"-->Application:
deactivate Application
note over Application : "FreeRTOS Cellular Library" APIs ready.\nApplication get network time with\nCellular_GetNetworkTime() function
Application -> "FreeRTOS Cellular Library" : Cellular_GetNetworkTime()
activate Application
"FreeRTOS Cellular Library"->cellular_comm_interface : pCommInterface->Send()
cellular_comm_interface->cellular_modem : AT+CCLK?
cellular_modem->cellular_comm_interface : +CCLK: "20/06/09,12:06:33+32"
cellular_comm_interface->cellular_comm_interface : Store `+CCLK: "20/06/09,12:06:33+32"` in buffer
cellular_comm_interface->"FreeRTOS Cellular Library" : receiveCallback
"FreeRTOS Cellular Library"->cellular_comm_interface : pCommInterface->recv()
cellular_comm_interface-->"FreeRTOS Cellular Library" : Return data in buffer
cellular_modem->cellular_comm_interface : OK
cellular_comm_interface->cellular_comm_interface : Store `OK` in buffer
cellular_comm_interface->"FreeRTOS Cellular Library" : receiveCallback
cellular_comm_interface-->"FreeRTOS Cellular Library" : Return data in buffer
"FreeRTOS Cellular Library"->Application : Return network time
deactivate Application
note over Application : Applicaton no longer need cellular\nconnectivity. Cellular_Cleanup() is \ncalled to close FreeRTOS Cellular Library.
Application -> "FreeRTOS Cellular Library" : Cellular_Cleanup()
activate Application
"FreeRTOS Cellular Library"->cellular_comm_interface : pCommInterface->Close()
cellular_comm_interface->cellular_modem : Power off device\nClose communication device driver\n
cellular_comm_interface-->"FreeRTOS Cellular Library":
"FreeRTOS Cellular Library"-->Application:
deactivate Application
@enduml

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="9in" height="7in" class="slides-canvas" viewBox="0 0 648 504">
<defs>
<linearGradient id="lg_b1cbe9_I0a3c1e5_92b9e4_90_4a_740a2" x1="0" y1="33" x2="0" y2="91" spreadMethod="reflect" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#B1CBE9" />
<stop offset="0.5" stop-color="#A3C1E5" />
<stop offset="1" stop-color="#92B9E4" />
</linearGradient>
<linearGradient id="lg_b1cbe9_I0a3c1e5_92b9e4_90_65_798b5" x1="0" y1="47" x2="0" y2="107" spreadMethod="reflect" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#B1CBE9" />
<stop offset="0.5" stop-color="#A3C1E5" />
<stop offset="1" stop-color="#92B9E4" />
</linearGradient>
<linearGradient id="lg_ffdd9c_I0ffd78e_ffd479_90_f9_d0275" x1="0" y1="202" x2="0" y2="306" spreadMethod="reflect" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#FFDD9C" />
<stop offset="0.5" stop-color="#FFD78E" />
<stop offset="1" stop-color="#FFD479" />
</linearGradient>
<marker id="ah1" markerUnits="userSpaceOnUse" markerWidth="36" markerHeight="21" viewBox="-18 -10.5 36 21" orient="auto">
<path d="M-9 5.25L0 0-9-5.25" fill="none" stroke="#000000" stroke-width="3" stroke-linecap="round" />
</marker>
</defs>
<g text-rendering="geometricPrecision" transform="scale(1, 1)">
<rect x="0" y="0" width="648" height="504" fill="#FFFFFF" />
<path fill="url(#lg_b1cbe9_I0a3c1e5_92b9e4_90_4a_740a2)" d="M13.75 381.88L623.4 381.88 623.4 439.9 13.75 439.9z" />
<path stroke-width="0.5" stroke="#5B9BD5" fill="none" d="M13.75 381.88L623.4 381.88 623.4 439.9 13.75 439.9z" />
<g transform="matrix(1, 0, 0, 1, 20.952362, 385.47693)"><text font-family="Noto Sans" font-style="normal" font-weight="normal" font-stretch="normal" font-size="18pt" fill="#000000" x="206.31061" y="33.614155"><tspan x="206.80165" y="34.1052" id="tp_0_shadow" fill="#000000" fill-opacity="0.27">Comm Interface</tspan><tspan x="206.31061" y="33.614155" id="tp_0">Comm Interface</tspan></text></g>
<path fill="url(#lg_b1cbe9_I0a3c1e5_92b9e4_90_65_798b5)" d="M13.75 48.12L623.4 48.12 623.4 108.89 13.75 108.89z" />
<path stroke-width="0.5" stroke="#5B9BD5" fill="none" d="M13.75 48.12L623.4 48.12 623.4 108.89 13.75 108.89z" />
<g transform="matrix(1, 0, 0, 1, 20.952362, 51.7163)"><text font-family="Noto Sans" font-style="normal" font-weight="normal" font-stretch="normal" font-size="18pt" fill="#000000" x="234.31061" y="34.990295"><tspan x="234.80165" y="35.481342" id="tp_1_shadow" fill="#000000" fill-opacity="0.27">Application</tspan><tspan x="234.31061" y="34.990295" id="tp_1">Application</tspan></text></g>
<g transform="matrix(1, 0, 0, 1, 338.37567, 109.73605)"><text font-family="Noto Sans" font-style="normal" font-weight="normal" font-stretch="normal" font-size="15pt" fill="#000000" x="0" y="42.83686"><tspan x="0" y="18.836859">FreeRTOS Cellular Interface</tspan><tspan xml:space="preserve" x="257.48438" y="18.836859"> </tspan><tspan x="0" y="42.83686">APIs request</tspan></text></g>
<path fill="#FFE699" fill-opacity="0.5" d="M13.75 161.67L623.4 161.67 623.4 349.85 13.75 349.85z" />
<path fill="url(#lg_ffdd9c_I0ffd78e_ffd479_90_f9_d0275)" d="M59.93 202.83L299.01 202.83 299.01 306.91 59.93 306.91z" />
<path stroke-width="0.5" stroke="#FFC000" fill="none" d="M59.93 202.83L299.01 202.83 299.01 306.91 59.93 306.91z" />
<g transform="matrix(1, 0, 0, 1, 67.13109, 206.43106)"><text font-family="Noto Sans" font-style="normal" font-weight="normal" font-stretch="normal" font-size="18pt" fill="#000000" x="22.080612" y="71.0426"><tspan x="7.376346" y="42.733643" id="tp_2_shadow" fill="#000000" fill-opacity="0.27">FreeRTOS-Cellular-</tspan><tspan x="6.8852997" y="42.242596" id="tp_2">FreeRTOS-Cellular-</tspan><tspan x="22.57166" y="71.533646" id="tp_3_shadow" fill="#000000" fill-opacity="0.27">Interface library</tspan><tspan x="22.080612" y="71.0426" id="tp_3">Interface library</tspan></text></g>
<path fill="url(#lg_ffdd9c_I0ffd78e_ffd479_90_f9_d0275)" d="M348.12 202.83L587.19 202.83 587.19 306.91 348.12 306.91z" />
<path stroke-width="0.5" stroke="#FFC000" fill="none" d="M348.12 202.83L587.19 202.83 587.19 306.91 348.12 306.91z" />
<g transform="matrix(1, 0, 0, 1, 355.31573, 206.43106)"><text font-family="Noto Sans" font-style="normal" font-weight="normal" font-stretch="normal" font-size="18pt" fill="#000000" x="22.088425" y="71.0426"><tspan x="24.079472" y="42.733643" id="tp_4_shadow" fill="#000000" fill-opacity="0.27">Cellular Module</tspan><tspan x="23.588425" y="42.242596" id="tp_4">Cellular Module</tspan><tspan xml:space="preserve" x="201.08842" y="42.242596"> </tspan><tspan x="22.579472" y="71.533646" id="tp_5_shadow" fill="#000000" fill-opacity="0.27">implementation</tspan><tspan x="22.088425" y="71.0426" id="tp_5">implementation</tspan></text></g>
<path marker-end="url(#ah1)" stroke-width="3" stroke="#000000" fill="none" d="M318.58 108.89L318.58 156.09 318.58 157.59" />
<path marker-end="url(#ah1)" stroke-width="3" stroke="#000000" fill="none" d="M318.58 349.85L318.58 376.29 318.58 377.79" />
</g>
</svg>

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB