Skip to content

Commit

Permalink
ref(doc-guide): Re-arranging code blocks to be legible
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Silva <miguelafsilva5@gmail.com>
  • Loading branch information
miguelafsilva5 authored and danielRep committed Jan 19, 2024
1 parent 6ba4f5f commit 573f753
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
12 changes: 6 additions & 6 deletions source/development/code_documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ Examples:
* @brief This structure represents a memory region
*/
struct memory_protection {
bool assigned; /**< Memory region assign flag */
vaddr_t base_addr; /**< Region base address */
size_t size; /**< This member contains the region size */
bool assigned; /**< Memory region assign flag */
vaddr_t base_addr; /**< Region base address */
size_t size; /**< This member contains the region size */
cpumap_t shared_cpus; /**< Bitmap used when sharing region w/other cores */
mem_flags_t mem_flags; /**< Region memory attributes */
};
Expand All @@ -252,9 +252,9 @@ Examples:
* @brief PSCI wakeup reason for CPUs.
*/
enum wakeup_reason {
PSCI_WAKEUP_CPU_OFF, /**< Wakeup reason CPU off */
PSCI_WAKEUP_POWERDOWN, /**< Wakeup reason CPU powerdown */
PSCI_WAKEUP_IDLE, /**< Wakeup reason CPU idle */
PSCI_WAKEUP_CPU_OFF, /**< Wakeup reason CPU off */
PSCI_WAKEUP_POWERDOWN, /**< Wakeup reason CPU powerdown */
PSCI_WAKEUP_IDLE, /**< Wakeup reason CPU idle */
PSCI_WAKEUP_NUM /**< Wakeup reason number of variants */
};
Expand Down
12 changes: 8 additions & 4 deletions source/development/doc_guidelines.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,10 @@ the code-block syntax. You also need to indent the code segment.
.. code-block:: c
uint64_t smc_fid = cpu.vcpu->regs->x[0]; uint64_t x1 = cpu.vcpu->regs->x[1]; uint64_t x2 =
cpu.vcpu->regs->x[2]; uint64_t x3 = cpu.vcpu->regs->x[3];
uint64_t smc_fid = cpu.vcpu->regs->x[0];
uint64_t x1 = cpu.vcpu->regs->x[1];
uint64_t x2 = cpu.vcpu->regs->x[2];
uint64_t x3 = cpu.vcpu->regs->x[3];
.. code-block:: rest
Expand All @@ -241,8 +243,10 @@ Rendered, the code blocks look like this:

.. code-block:: c
uint64_t smc_fid = cpu.vcpu->regs->x[0]; uint64_t x1 = cpu.vcpu->regs->x[1]; uint64_t x2 =
cpu.vcpu->regs->x[2]; uint64_t x3 = cpu.vcpu->regs->x[3];
uint64_t smc_fid = cpu.vcpu->regs->x[0];
uint64_t x1 = cpu.vcpu->regs->x[1];
uint64_t x2 = cpu.vcpu->regs->x[2];
uint64_t x3 = cpu.vcpu->regs->x[3];
.. code-block:: shell
Expand Down

0 comments on commit 573f753

Please sign in to comment.