elpekenin/utils/sections.h

Utilities to add elements into specific linker sections, and then iterate over those sections.


type init_fn
[source]

Signature for an initializer function.

type deinit_fn
[source]

Signature for a finalizer function.

type sendchar_func_t
[source]

Signature for a low-level function called by printf().


PEKE_PRE_INIT(func, prio)
[source]

Put a function in the pre-initialization section.

Parameters:
  • func – The function to be added.

  • prio – Its priority, lower number -> called earlier

PEKE_POST_INIT(func, prio)
[source]

Put a function in the post-initialization section.

Parameters:
  • func – The function to be added.

  • prio – Its priority, lower number -> called earlier

PEKE_CORE1_INIT(func)
[source]

Put a function in the second core’s initialization section.

Parameters:
  • func – The function to be added.

PEKE_CORE1_LOOP(func)
[source]

Put a function in the second core’s mainloop section.

Parameters:
  • func – The function to be added.

PEKE_DEINIT(func, prio)
[source]

Put a function in the finalizer section.

Parameters:
  • func – The function to be added.

  • prio – Its priority, lower number -> called earlier

PEKE_SENDCHAR(func)
[source]

Put a function in the section that implements printf()’s logic.

Parameters:
  • func – The function to be added.


FOREACH_SECTION(type, name, var)
[source]

Macro to iterate all elements on a linker section.

Parameters:
  • type – Type of the elements in this section.

  • name – Name of the section to be iterated.

  • var – Name of the variable used on the for