Choco OS  V.0.16.9.0
Join to the chocolate world
oc_mem_lld.c
1 
27 #include <oc_mem_lld.h>
28 #include <oc_interrupts.h>
29 #include <oc_lsf.h>
30 #include <oc_module.h>
31 
37 #define _________________________________________LOCAL_VARIABLES_SECTION____________________________________________________________________
38 
39 static oC_MEM_LLD_Interrupt_t BusFaultInterruptHandler = NULL;
40 static oC_MEM_LLD_Interrupt_t MemoryFaultInterruptHandler = NULL;
41 static bool BusFaultInterruptEnabledFlag = false;
42 static bool MemoryFaultInterruptEnabledFlag = false;
43 
44 #undef _________________________________________LOCAL_VARIABLES_SECTION____________________________________________________________________
45 
51 #define _________________________________________INTERFACE_FUNCTIONS_SECTION________________________________________________________________
52 
55 
56 
57 //==========================================================================================================================================
62 //==========================================================================================================================================
63 oC_ErrorCode_t oC_MEM_LLD_TurnOnDriver( void )
64 {
65  oC_ErrorCode_t errorCode = oC_ErrorCode_ImplementError;
66 
67  if(oC_Module_TurnOffVerification(&errorCode , oC_Module_MEM_LLD))
68  {
70  BusFaultInterruptHandler = NULL;
71  MemoryFaultInterruptHandler = NULL;
72  BusFaultInterruptEnabledFlag = false;
73  MemoryFaultInterruptEnabledFlag = false;
74 
75  oC_Module_TurnOn(oC_Module_MEM_LLD);
77 
78  errorCode = oC_ErrorCode_None;
79  }
80  else
81  {
82  errorCode = oC_ErrorCode_ModuleIsTurnedOn;
83  }
84  return errorCode;
85 }
86 //==========================================================================================================================================
91 //==========================================================================================================================================
92 oC_ErrorCode_t oC_MEM_LLD_TurnOffDriver( void )
93 {
94  oC_ErrorCode_t errorCode = oC_ErrorCode_ImplementError;
95 
96  if(oC_Module_TurnOnVerification(&errorCode , oC_Module_MEM_LLD))
97  {
99  oC_Module_TurnOff(oC_Module_MEM_LLD);
100  MemoryFaultInterruptEnabledFlag = false;
101  BusFaultInterruptEnabledFlag = false;
102 
103  if(
104  oC_AssignErrorCodeIfFalse(&errorCode , oC_MCS_DisableInterrupt(BusFault_IRQn) , oC_ErrorCode_CannotTurnOffInterruptInMachineModule) &&
105  oC_AssignErrorCodeIfFalse(&errorCode , oC_MCS_DisableInterrupt(MemoryManagement_IRQn) , oC_ErrorCode_CannotTurnOffInterruptInMachineModule)
106  )
107  {
108  errorCode = oC_ErrorCode_None;
109  }
111  }
112  else
113  {
114  errorCode = oC_ErrorCode_ModuleNotStartedYet;
115  }
116 
117  return errorCode;
118 }
119 //==========================================================================================================================================
124 //==========================================================================================================================================
126 {
127  return oC_LSF_GetRamStart();
128 }
129 
130 //==========================================================================================================================================
135 //==========================================================================================================================================
137 {
138  return oC_LSF_GetRamEnd();
139 }
140 
141 //==========================================================================================================================================
146 //==========================================================================================================================================
148 {
149  return oC_LSF_GetRamSize();
150 }
151 
152 //==========================================================================================================================================
157 //==========================================================================================================================================
159 {
160  return oC_LSF_GetDmaStart();
161 }
162 
163 //==========================================================================================================================================
168 //==========================================================================================================================================
170 {
171  return oC_LSF_GetDmaEnd();
172 }
173 
174 //==========================================================================================================================================
179 //==========================================================================================================================================
181 {
182  return oC_LSF_GetDmaSize();
183 }
184 
185 //==========================================================================================================================================
190 //==========================================================================================================================================
192 {
193  return oC_LSF_GetRomStart();
194 }
195 
196 //==========================================================================================================================================
201 //==========================================================================================================================================
203 {
204  return oC_LSF_GetRomEnd();
205 }
206 
207 //==========================================================================================================================================
212 //==========================================================================================================================================
214 {
215  return oC_LSF_GetRomSize();
216 }
217 
218 //==========================================================================================================================================
223 //==========================================================================================================================================
225 {
226  return oC_LSF_GetHeapStart();
227 }
228 
229 //==========================================================================================================================================
234 //==========================================================================================================================================
236 {
237  return oC_LSF_GetHeapEnd();
238 }
239 
240 //==========================================================================================================================================
245 //==========================================================================================================================================
247 {
248  return oC_LSF_GetHeapSize();
249 }
250 
251 //==========================================================================================================================================
256 //==========================================================================================================================================
258 {
259  return oC_LSF_GetStackStart();
260 }
261 
262 //==========================================================================================================================================
267 //==========================================================================================================================================
269 {
270  return oC_LSF_GetStackEnd();
271 }
272 
273 //==========================================================================================================================================
278 //==========================================================================================================================================
280 {
281  return oC_LSF_GetStackSize();
282 }
283 
284 //==========================================================================================================================================
289 //==========================================================================================================================================
291 {
292  return oC_LSF_GetDataStart();
293 }
294 
295 //==========================================================================================================================================
300 //==========================================================================================================================================
302 {
303  return oC_LSF_GetDataEnd();
304 }
305 
306 //==========================================================================================================================================
311 //==========================================================================================================================================
313 {
314  return oC_LSF_GetDataSize();
315 }
316 
317 //==========================================================================================================================================
322 //==========================================================================================================================================
324 {
325  return oC_LSF_GetBssStart();
326 }
327 
328 //==========================================================================================================================================
333 //==========================================================================================================================================
335 {
336  return oC_LSF_GetBssEnd();
337 }
338 
339 //==========================================================================================================================================
344 //==========================================================================================================================================
346 {
347  return oC_LSF_GetBssSize();
348 }
349 
350 //==========================================================================================================================================
355 //==========================================================================================================================================
357 {
358  return oC_LSF_GetTextStart();
359 }
360 
361 //==========================================================================================================================================
366 //==========================================================================================================================================
368 {
369  return oC_LSF_GetTextEnd();
370 }
371 
372 //==========================================================================================================================================
377 //==========================================================================================================================================
379 {
380  return oC_LSF_GetTextSize();
381 }
382 
383 //==========================================================================================================================================
388 //==========================================================================================================================================
390 {
391  return oC_MCS_MEMORY_ALIGNMENT;
392 }
393 
394 //==========================================================================================================================================
399 //==========================================================================================================================================
400 bool oC_MEM_LLD_IsRamAddress( const void * Address )
401 {
402  return oC_LSF_IsRamAddress(Address) || oC_LSF_IsExternalAddress(Address) || oC_LSF_IsDmaAddress(Address );
403 }
404 
405 //==========================================================================================================================================
410 //==========================================================================================================================================
411 bool oC_MEM_LLD_IsExternalAddress( const void * Address )
412 {
413  return oC_LSF_IsExternalAddress(Address);
414 }
415 
416 //==========================================================================================================================================
421 //==========================================================================================================================================
422 bool oC_MEM_LLD_IsDmaRamAddress( const void * Address )
423 {
424  return oC_LSF_IsDmaAddress(Address);
425 }
426 
427 //==========================================================================================================================================
432 //==========================================================================================================================================
433 bool oC_MEM_LLD_IsFlashAddress( const void * Address )
434 {
435  return oC_LSF_IsRomAddress(Address);
436 }
437 
438 //==========================================================================================================================================
443 //==========================================================================================================================================
444 bool oC_MEM_LLD_IsUsedFlashAddress( const void * Address )
445 {
446  return (Address > oC_LSF_GetTextStart()) && (Address < oC_LSF_GetTextEnd());
447 }
448 
449 //==========================================================================================================================================
454 //==========================================================================================================================================
455 bool oC_MEM_LLD_IsHeapAddress( const void * Address )
456 {
457  return (Address >= oC_LSF_GetHeapStart()) && (Address < oC_LSF_GetHeapEnd());
458 }
459 
460 //==========================================================================================================================================
465 //==========================================================================================================================================
467 {
468  oC_ErrorCode_t errorCode = oC_ErrorCode_ImplementError;
469 
470  if( oC_MEM_LLD_IsRamAddress(Interrupt) || oC_MEM_LLD_IsUsedFlashAddress(Interrupt))
471  {
472  if(
473  oC_Module_TurnOnVerification( &errorCode , oC_Module_MEM_LLD) &&
474  oC_AssignErrorCodeIfFalse( &errorCode , MemoryFaultInterruptHandler == NULL , oC_ErrorCode_InterruptHandlerAlreadySet)
475  )
476  {
477  /* Must not turn off interrupts, because there is no possible to turn it on, when
478  * the handler is not set. */
479  MemoryFaultInterruptHandler = Interrupt;
480  errorCode = oC_ErrorCode_None;
481  }
482  }
483  else
484  {
485  errorCode = oC_ErrorCode_WrongAddress;
486  }
487 
488 
489  return errorCode;
490 }
491 
492 //==========================================================================================================================================
497 //==========================================================================================================================================
499 {
500  oC_ErrorCode_t errorCode = oC_ErrorCode_ImplementError;
501 
502  if( oC_MEM_LLD_IsRamAddress(Interrupt) || oC_MEM_LLD_IsUsedFlashAddress(Interrupt))
503  {
504  if(
505  oC_Module_TurnOnVerification( &errorCode , oC_Module_MEM_LLD) &&
506  oC_AssignErrorCodeIfFalse( &errorCode , BusFaultInterruptHandler == NULL , oC_ErrorCode_InterruptHandlerAlreadySet)
507  )
508  {
509  /* Must not turn off interrupts, because there is no possible to turn it on, when
510  * the handler is not set. */
511  BusFaultInterruptHandler = Interrupt;
512  errorCode = oC_ErrorCode_None;
513  }
514  }
515  else
516  {
517  errorCode = oC_ErrorCode_WrongAddress;
518  }
519 
520  return errorCode;
521 }
522 
523 //==========================================================================================================================================
528 //==========================================================================================================================================
530 {
531  return oC_ErrorCode_None;
532 }
533 
534 //==========================================================================================================================================
539 //==========================================================================================================================================
541 {
542  return oC_ErrorCode_None;
543 }
544 
545 //==========================================================================================================================================
550 //==========================================================================================================================================
552 {
553  oC_ErrorCode_t errorCode = oC_ErrorCode_ImplementError;
554 
555  if(
556  oC_Module_TurnOnVerification( &errorCode , oC_Module_MEM_LLD) &&
557  oC_AssignErrorCodeIfFalse( &errorCode , BusFaultInterruptHandler != NULL , oC_ErrorCode_InterruptHandlerNotSet)
558  )
559  {
560  errorCode = oC_ErrorCode_None;
561  }
562 
563  return errorCode;
564 }
565 
566 //==========================================================================================================================================
571 //==========================================================================================================================================
573 {
574  return oC_ErrorCode_None;
575 }
576 
577 //==========================================================================================================================================
582 //==========================================================================================================================================
584 {
585  bool interruptTurnedOn = true;
586 
587  return interruptTurnedOn;
588 }
589 
590 //==========================================================================================================================================
595 //==========================================================================================================================================
597 {
598  bool interruptTurnedOn = true;
599 
600  return interruptTurnedOn;
601 }
602 
603 //==========================================================================================================================================
608 //==========================================================================================================================================
610 {
611  oC_ErrorCode_t errorCode = oC_ErrorCode_ImplementError;
612  oC_MCS_MemoryRegionConfig_t mcsConfig;
613 
614  if(
615  oC_Module_TurnOnVerification( &errorCode , oC_Module_MEM_LLD) &&
616  ErrorCondition( oC_LSF_IsCorrectAddress(Config) , oC_ErrorCode_WrongAddress)
617  )
618  {
619  mcsConfig.AlignSize = false;
620  mcsConfig.BaseAddress = Config->BaseAddress;
621  mcsConfig.Bufforable = Config->Bufforable;
622  mcsConfig.Cacheable = Config->Cachable;
623  mcsConfig.Power = Config->Power;
624  mcsConfig.PrivilegedAccess = Config->PrivilegedAccess;
625  mcsConfig.UserAccess = Config->UserAccess;
626  mcsConfig.RegionNumber = Config->RegionNumber;
627  mcsConfig.Shareable = false;
628  mcsConfig.Size = Config->Size;
629 
630  if(Config->FindFreeRegion == false || ErrorCondition(oC_MCS_ReadFreeRegionNumber(&mcsConfig.RegionNumber) , oC_ErrorCode_NoChannelAvailable))
631  {
632  if(oC_AssignErrorCode(&errorCode , oC_MCS_ConfigureMemoryRegion(&mcsConfig)))
633  {
634  if( Config->FindFreeRegion == true
635  && ErrorCondition( oC_LSF_IsRamAddress(Config) || oC_LSF_IsExternalAddress(Config) , oC_ErrorCode_OutputAddressNotInRAM )
636  )
637  {
638  Config->RegionNumber = mcsConfig.RegionNumber;
639  }
640  errorCode = oC_ErrorCode_None;
641  }
642  }
643  }
644 
645  return errorCode;
646 }
647 
648 //==========================================================================================================================================
653 //==========================================================================================================================================
655 {
656  return oC_MCS_SetMemoryAccessMode(Mode);
657 }
658 
659 //==========================================================================================================================================
664 //==========================================================================================================================================
666 {
668 }
669 
670 #undef _________________________________________INTERFACE_FUNCTIONS_SECTION________________________________________________________________
671 
678 #define _________________________________________INTERRUPTS_SECTION_________________________________________________________________________
679 
680 //==========================================================================================================================================
684 //==========================================================================================================================================
685 oC_InterruptHandler(System, BusFault)
686 {
687  if(BusFaultInterruptHandler && BusFaultInterruptEnabledFlag)
688  {
689  BusFaultInterruptHandler();
690  }
691 }
692 
693 //==========================================================================================================================================
697 //==========================================================================================================================================
698 oC_InterruptHandler(System, MemoryManagement)
699 {
700  if(MemoryFaultInterruptHandler && MemoryFaultInterruptEnabledFlag)
701  {
702  MemoryFaultInterruptHandler();
703  }
704 }
705 
706 #undef _________________________________________INTERRUPTS_SECTION_________________________________________________________________________
#define oC_InterruptHandler(BASE_NAME, TYPE_NAME)
Define handler for interrupt.
static void * oC_LSF_GetHeapStart(void)
returns heap start address
Definition: oc_lsf.h:326
static void * oC_LSF_GetDmaStart(void)
returns start address of DMA section
Definition: oc_lsf.h:539
void * oC_MEM_LLD_GetFlashEndAddress(void)
returns end address of the flash
Definition: oc_mem_lld.c:202
bool oC_MEM_LLD_SetMemoryAccessMode(oC_MEM_LLD_MemoryAccessMode_t Mode)
Change current memory access mode.
Definition: oc_mem_lld.c:654
bool oC_MEM_LLD_IsMemoryFaultInterruptTurnedOn(void)
checks if memory fault interrupt is turned on
Definition: oc_mem_lld.c:583
void * oC_MEM_LLD_GetStackEndAddress(void)
returns end address of the stack
Definition: oc_mem_lld.c:268
bool oC_MEM_LLD_IsUsedFlashAddress(const void *Address)
checks if the pointer is in used flash section
Definition: oc_mem_lld.c:444
bool Cacheable
True if the region should be cacheable - If you set a region to be cacheable: When you load from that...
Definition: oc_mcs.h:231
static void * oC_LSF_GetRamEnd(void)
returns ram end address
Definition: oc_lsf.h:172
oC_ErrorCode_t oC_MEM_LLD_TurnOffBusFaultInterrupt(void)
turns off bus fault interrupt
Definition: oc_mem_lld.c:572
oC_MEM_LLD_Size_t oC_MEM_LLD_GetDataSize(void)
returns size of the data section
Definition: oc_mem_lld.c:312
void * oC_MEM_LLD_GetDataEndAddress(void)
returns end address of the data section
Definition: oc_mem_lld.c:301
oC_ErrorCode_t oC_MEM_LLD_SetBusFaultInterrupt(oC_MEM_LLD_Interrupt_t Interrupt)
sets interrupt handler for bus fault
Definition: oc_mem_lld.c:498
oC_MemorySize_t Size
Size of the region.
Definition: oc_mcs.h:225
bool oC_MCS_SetMemoryAccessMode(oC_MCS_MemoryAccessMode_t Mode)
sets the memory access mode
Definition: oc_mcs.c:847
void * oC_MEM_LLD_GetFlashStartAddress(void)
returns start address of the flash
Definition: oc_mem_lld.c:191
oC_ErrorCode_t oC_MEM_LLD_TurnOffDriver(void)
release the driver
Definition: oc_mem_lld.c:92
stores configuration of the memory region
Definition: oc_mem_lld.h:114
bool oC_MEM_LLD_IsExternalAddress(const void *Address)
checks if the pointer is in external section
Definition: oc_mem_lld.c:411
void * oC_MEM_LLD_GetDmaRamStartAddress(void)
returns start address of the DMA RAM
Definition: oc_mem_lld.c:158
static oC_UInt_t oC_LSF_GetDmaSize(void)
returns size of the section in linkage
Definition: oc_lsf.h:569
const void * BaseAddress
Base address of the region - this must point to the start of the region.
Definition: oc_mem_lld.h:116
static void * oC_LSF_GetRomEnd(void)
returns rom end address
Definition: oc_lsf.h:130
The file with interface for LSF module.
static void * oC_LSF_GetTextStart(void)
returns text start address
Definition: oc_lsf.h:284
oC_ErrorCode_t oC_MEM_LLD_ConfigureMemoryRegion(oC_MEM_LLD_MemoryRegionConfig_t *Config)
configures memory region
Definition: oc_mem_lld.c:609
bool oC_MEM_LLD_IsFlashAddress(const void *Address)
checks if the pointer is in flash section
Definition: oc_mem_lld.c:433
static oC_UInt_t oC_LSF_GetRomSize(void)
returns size of the section in linkage
Definition: oc_lsf.h:144
oC_ErrorCode_t oC_MEM_LLD_TurnOnBusFaultInterrupt(void)
turns on bus fault interrupt
Definition: oc_mem_lld.c:551
The file with LLD interface for the MEM driver.
void * oC_MEM_LLD_GetUsedFlashEndAddress(void)
returns used flash end address
Definition: oc_mem_lld.c:367
const void * BaseAddress
Base address of the region - this must point to the start of the region.
Definition: oc_mcs.h:224
oC_ErrorCode_t oC_MEM_LLD_TurnOnDriver(void)
initializes the driver to work
Definition: oc_mem_lld.c:63
void * oC_MEM_LLD_GetHeapEndAddress(void)
returns end address of the heap
Definition: oc_mem_lld.c:235
bool oC_MEM_LLD_IsBusFaultInterruptTurnedOn(void)
checks if bus fault interrupt is turned on
Definition: oc_mem_lld.c:596
void * oC_MEM_LLD_GetBssEndAddress(void)
returns end address of the Bss section
Definition: oc_mem_lld.c:334
oC_MEM_LLD_Size_t oC_MEM_LLD_GetUsedFlashSize(void)
returns size of the used flash section
Definition: oc_mem_lld.c:378
static void * oC_LSF_GetTextEnd(void)
returns text end address
Definition: oc_lsf.h:298
oC_MEM_LLD_Size_t oC_MEM_LLD_GetDmaRamSize(void)
returns size of the DMA ram
Definition: oc_mem_lld.c:180
static void * oC_LSF_GetRamStart(void)
returns ram start address
Definition: oc_lsf.h:158
uint32_t RegionNumber
Number of the region to configure.
Definition: oc_mcs.h:233
oC_Access_t UserAccess
Definition of access for user space.
Definition: oc_mem_lld.h:119
oC_ErrorCode_t oC_MCS_ConfigureMemoryRegion(const oC_MCS_MemoryRegionConfig_t *Config)
configures memory region
Definition: oc_mcs.c:701
bool Cachable
True if the region should be cacheable - If you set a region to be cacheable: When you load from that...
Definition: oc_mem_lld.h:121
static void * oC_LSF_GetBssStart(void)
returns bss start address
Definition: oc_lsf.h:242
The file with interface for the module library.
oC_Access_t PrivilegedAccess
Definition of access for privileged space (portable or core)
Definition: oc_mem_lld.h:118
bool Bufforable
True if the region should be bufforable - Bufferable means whether a write to the address can be buff...
Definition: oc_mcs.h:232
static oC_UInt_t oC_LSF_GetDataSize(void)
returns size of the section in linkage
Definition: oc_lsf.h:228
static void * oC_LSF_GetDmaEnd(void)
returns end address of DMA section
Definition: oc_lsf.h:554
static void * oC_LSF_GetDataStart(void)
returns data start address
Definition: oc_lsf.h:200
bool oC_MEM_LLD_IsHeapAddress(const void *Address)
checks if the pointer is in heap section
Definition: oc_mem_lld.c:455
oC_Access_t UserAccess
Definition of access for user space.
Definition: oc_mcs.h:228
static void * oC_LSF_GetStackEnd(void)
returns stack end address
Definition: oc_lsf.h:382
oC_MemorySize_t Size
Size of the region.
Definition: oc_mem_lld.h:117
uint32_t RegionNumber
(optional) Number of the region to configure.
Definition: oc_mem_lld.h:123
static oC_UInt_t oC_LSF_GetTextSize(void)
returns size of the section in linkage
Definition: oc_lsf.h:312
oC_MEM_LLD_MemoryAccessMode_t
stores access memory mode
Definition: oc_mem_lld.h:134
oC_MEM_LLD_Size_t oC_MEM_LLD_GetRamSize(void)
returns size of the ram
Definition: oc_mem_lld.c:147
oC_MEM_LLD_Size_t oC_MEM_LLD_GetHeapSize(void)
returns size of the heap
Definition: oc_mem_lld.c:246
static void oC_Module_TurnOn(oC_Module_t Module)
sets module as turned on
Definition: oc_module.h:170
oC_MEM_LLD_Size_t oC_MEM_LLD_GetFlashSize(void)
returns size of the flash section
Definition: oc_mem_lld.c:213
void * oC_MEM_LLD_GetRamEndAddress(void)
returns end address of the RAM
Definition: oc_mem_lld.c:136
void * oC_MEM_LLD_GetUsedFlashStartAddress(void)
returns start address of the used flash section
Definition: oc_mem_lld.c:356
static void oC_MCS_EnterCriticalSection(void)
Enters to critical section.
Definition: oc_mcs.h:755
oC_UInt_t oC_MEM_LLD_Size_t
type for storing size of memory
Definition: oc_mem_lld.h:157
void * oC_MEM_LLD_GetBssStartAddress(void)
returns start address of the Bss section
Definition: oc_mem_lld.c:323
void * oC_MEM_LLD_GetHeapStartAddress(void)
returns start address of the heap
Definition: oc_mem_lld.c:224
bool Bufforable
True if the region should be bufforable - Bufferable means whether a write to the address can be buff...
Definition: oc_mem_lld.h:122
configuration structure for the memory region
Definition: oc_mcs.h:222
oC_Access_t PrivilegedAccess
Definition of access for privileged space (portable or core)
Definition: oc_mcs.h:229
The file with interface interrupt module.
bool FindFreeRegion
If true, the RegionNumber field is ignored and filled with the new value after configuration.
Definition: oc_mem_lld.h:124
void * oC_MEM_LLD_GetStackStartAddress(void)
returns start address of the stack
Definition: oc_mem_lld.c:257
bool oC_MCS_ReadFreeRegionNumber(uint32_t *outFreeRegionNumber)
reads number of a free region
Definition: oc_mcs.c:807
oC_MEM_LLD_MemoryAccessMode_t oC_MEM_LLD_GetMemoryAccessMode(void)
returns currently configured memory access mode
Definition: oc_mem_lld.c:665
static oC_UInt_t oC_LSF_GetBssSize(void)
returns size of the section in linkage
Definition: oc_lsf.h:270
static bool oC_Module_TurnOffVerification(oC_ErrorCode_t *outErrorCode, oC_Module_t Module)
verify if module is turned off
Definition: oc_module.h:155
static bool oC_MCS_ExitCriticalSection(void)
Exits from critical section.
Definition: oc_mcs.h:784
oC_ErrorCode_t oC_MEM_LLD_SetMemoryFaultInterrupt(oC_MEM_LLD_Interrupt_t Interrupt)
sets interrupt handler for memory fault
Definition: oc_mem_lld.c:466
static bool oC_Module_TurnOnVerification(oC_ErrorCode_t *outErrorCode, oC_Module_t Module)
verify if module is turned on
Definition: oc_module.h:138
oC_MEM_LLD_Size_t oC_MEM_LLD_GetBssSize(void)
returns size of the Bss section
Definition: oc_mem_lld.c:345
bool oC_MEM_LLD_IsDmaRamAddress(const void *Address)
checks if the pointer is in DMA RAM section
Definition: oc_mem_lld.c:422
oC_MEM_LLD_Size_t oC_MEM_LLD_GetAlignmentSize(void)
returns size of alignment
Definition: oc_mem_lld.c:389
oC_ErrorCode_t oC_MEM_LLD_TurnOffMemoryFaultInterrupt(void)
turns off memory fault interrupt
Definition: oc_mem_lld.c:540
oC_ErrorCode_t oC_MEM_LLD_TurnOnMemoryFaultInterrupt(void)
turns on memory fault interrupt
Definition: oc_mem_lld.c:529
void(* oC_MEM_LLD_Interrupt_t)(void)
type for storing memory interrupt pointers
Definition: oc_mem_lld.h:167
void * oC_MEM_LLD_GetRamStartAddress(void)
returns start address of the RAM
Definition: oc_mem_lld.c:125
void * oC_MEM_LLD_GetDmaRamEndAddress(void)
returns end address of the DMA RAM
Definition: oc_mem_lld.c:169
oC_Power_t Power
Power state for the region (enabled or disabled)
Definition: oc_mem_lld.h:120
oC_MCS_MemoryAccessMode_t oC_MCS_GetMemoryAccessMode(void)
reads memory access mode
Definition: oc_mcs.c:870
bool Shareable
For a shareable memory region that is implemented, the memory system provides data synchronization be...
Definition: oc_mcs.h:230
oC_MEM_LLD_Size_t oC_MEM_LLD_GetStackSize(void)
returns size of the stack
Definition: oc_mem_lld.c:279
static void * oC_LSF_GetDataEnd(void)
returns data end address
Definition: oc_lsf.h:214
oC_Power_t Power
Power state for the region (enabled or disabled)
Definition: oc_mcs.h:227
static void * oC_LSF_GetRomStart(void)
returns rom start address
Definition: oc_lsf.h:116
static void * oC_LSF_GetBssEnd(void)
returns bss end address
Definition: oc_lsf.h:256
static void * oC_LSF_GetStackStart(void)
returns stack start address
Definition: oc_lsf.h:368
static void * oC_LSF_GetHeapEnd(void)
returns heap end address
Definition: oc_lsf.h:340
static oC_UInt_t oC_LSF_GetStackSize(void)
returns size of the section in linkage
Definition: oc_lsf.h:396
bool oC_MCS_DisableInterrupt(IRQn_Type InterruptNumber)
disables interrupt with specified number
Definition: oc_mcs.c:379
static oC_UInt_t oC_LSF_GetHeapSize(void)
returns size of the section in linkage
Definition: oc_lsf.h:354
static oC_UInt_t oC_LSF_GetRamSize(void)
returns size of the section in linkage
Definition: oc_lsf.h:186
bool AlignSize
True if the MCS should find the size nearest to the value given as the Size field.
Definition: oc_mcs.h:226
bool oC_MEM_LLD_IsRamAddress(const void *Address)
checks if the pointer is in ram section
Definition: oc_mem_lld.c:400
#define NULL
pointer to a zero
Definition: oc_null.h:37
void * oC_MEM_LLD_GetDataStartAddress(void)
returns start address of the data section
Definition: oc_mem_lld.c:290
static void oC_Module_TurnOff(oC_Module_t Module)
sets module as turned off
Definition: oc_module.h:185