13 | | Each driver xxx_driver define two low-level functions ''_xxx_get_register()'' and ''_xxx_set_register() |
14 | | to access the peripheral addressable registers. These functions are in charge to compute the physical addresses, taking into account the cluster extension if required. |
| 11 | Each driver xxx_driver define two low-level functions ''_xxx_get_register()'' and ''_xxx_set_register()'' |
| 12 | to access the peripheral addressable registers. These functions are in charge to compute the physical addresses, taking into account the cluster extension if required. |
| 13 | |
| 14 | * '''External peripherals''': Accesses use virtual addresses if the MMU (Memory management Unit) is activated, or physical addresses if it is not. In this case, the physical address is computed as pbase = SEG_XXX_BASE + cluster_io << 32. |
| 15 | |
| 16 | * '''Internal peripherals''': Accesses use virtual addresses, and the MMU must be activated. The peripheral virtual base address is computed as vbase = SEG_XXX_BASE + cluster_xy * CLUSTER_INCREMENT. |
| 17 | |
| 18 | The SEG_XXX_BASE , X_IO, Y_IO, and CLUSTER_INCREMENT vatiables must be defined in the ''hard_config.h" file. |