diff --git a/README.md b/README.md index c49a4a01..2bbc9b44 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ picoRTOS is a small hard RTOS with as little overhead as humanly possible. OpenPicoRTOS has been designed with these requirements in mind: - Compliance with "The Power Of 10" from the NASA/JPL (https://en.wikipedia.org/wiki/The_Power_of_10:_Rules_for_Developing_Safety-Critical_Code) + - Compliance with MISRA C 2012 - Limited use of inline assembly: - Inline assembly should be side-effect free (no use or modification of variables) - Inline assembly can be safely removed from the static analysis @@ -125,6 +126,7 @@ at the following address: https://jnaulet.github.io/OpenPicoRTOS - ARM Cortex-M7 - Atmel ATMega (AVR5+) - Atmel TinyAVR (0+) Series + - Intel 8051 / MCS51 - MIPS M51xx / PIC32Mx - RISC-V RV32IMAC - PowerPC e200z4 @@ -150,8 +152,10 @@ at the following address: https://jnaulet.github.io/OpenPicoRTOS - Atmel ATSAMD5x/E5x - Atmel ATtiny817 - Atmel ATtiny1607 + - Cypress CY7C6801xA / EZ-USB FX2 - GigaDevice GD32VF103 - Microchip PIC32MZ-EF + - Nuvoton N76E003 - NXP MPC574x series - NXP MPC577x series - Raspberry Pico RP2040 @@ -237,6 +241,8 @@ Basic demo code is provided for the following boards: - ATtiny817-Xplained Mini - ATtiny1607 Curiosity Nano - Curiosity 2.0 PIC32 MZ EF + - Infineon EZ-USB FX2LP + - Nuvoton N76E003 / MCU-E003 - NXP Devkit MPC5748G (dual-core SMP) - NXP MPC5775E-EVB (dual-core SMP) (staging) - Sipeed Longan Nano diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 17a53edc..1c632f73 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,19 @@ # Release notes +## picoRTOS v1.9.5 +### What's new ? + +The biggest improvement of this release is the support for the Intel 8051 / MCS51 family of microcontrollers and the associated support +for SDCC as a compiler. + +Code for ucsim_51, Nuvoton n76e003 & Cypress/Infineon Cy7c6801xA chips is provided as an example. This is still incomplete, though, as +no driver (except for the clocks) has been provided, only the kernel runs. + +Major fixes have been added to the SMP ports (main cores are now waiting until the auxiliary ones are idling before running the scheduler). +Chips that do not support bus snooping are now using the mutexes properly. + +Finally, 8bits int types have been used whenever possible on 8bit architectures (AVR & 8051). + ## picoRTOS v1.9.4 ### What's new ? diff --git a/docs/files/arch/include/picoRTOS-SMP_port-h.html b/docs/files/arch/include/picoRTOS-SMP_port-h.html index b941b62b..2f39482c 100644 --- a/docs/files/arch/include/picoRTOS-SMP_port-h.html +++ b/docs/files/arch/include/picoRTOS-SMP_port-h.html @@ -39,10 +39,10 @@
- +HideAllBut([19, 20], 22);// --> diff --git a/docs/files/arch/include/picoRTOS_port-h.html b/docs/files/arch/include/picoRTOS_port-h.html index b6fd2b9d..8049fcb5 100644 --- a/docs/files/arch/include/picoRTOS_port-h.html +++ b/docs/files/arch/include/picoRTOS_port-h.html @@ -15,7 +15,7 @@ -
extern void arch_syscall( picoRTOS_syscall_t syscall, /*@null@*/ void * priv )
Syscall port function
This function will be called by picoRTOS every time someone calls picoRTOS_schedule, picoRTOS_sleep or picoRTOS_sleep_until and MUST call picoRTOS_syscall
As syscalls switch contexts, you want this function to trigger an interrupt, unless you cannot (see AVR ports)
syscall | The syscall to execute |
priv | The syscall parameter to pass to picoRTOS_syscall (can be NULL) |
extern void arch_syscall( syscall_t syscall, /*@null@*/ void * priv )
Syscall port function
This function will be called by picoRTOS every time someone calls picoRTOS_schedule, picoRTOS_sleep or picoRTOS_sleep_until and MUST call picoRTOS_syscall
As syscalls switch contexts, you want this function to trigger an interrupt, unless you cannot (see AVR ports)
syscall | The syscall to execute |
priv | The syscall parameter to pass to picoRTOS_syscall (can be NULL) |
Executes a tick increment
extern /*@exposed@*/ /*@null@*/ picoRTOS_stack_t *picoRTOS_tick( picoRTOS_stack_t * sp )
Architecture port initialization function
extern void arch_init( void )
Suspends the scheduling
extern void arch_suspend( void )
Resumes the scheduling
extern void arch_resume( void )
Starts the first task on the system (idle) and bootstraps the scheduler
extern /*@noreturn@*/ void arch_start_first_task( picoRTOS_stack_t * sp )
Syscall port function
extern void arch_syscall( picoRTOS_syscall_t syscall, /*@null@*/ void * priv )
The default idle function/task
extern /*@noreturn@*/ void arch_idle( /*@null@*/ void * null )
Atomic test and set operation
extern /*@unused@*/ picoRTOS_atomic_t arch_test_and_set( picoRTOS_atomic_t * ptr )
Atomic compare and swap operation, will swap the value of *var to new if it’s equal to old
extern /*@unused@*/ picoRTOS_atomic_t arch_compare_and_swap( picoRTOS_atomic_t * var, picoRTOS_atomic_t old, picoRTOS_atomic_t val )
Enables an irq
extern /*@unused@*/ void arch_enable_interrupt( picoRTOS_irq_t irq )
Disables an irq
extern /*@unused@*/ void arch_disable_interrupt( picoRTOS_irq_t irq )
Provides the current cpu counter value
extern picoRTOS_cycles_t arch_counter( arch_counter_t counter, picoRTOS_cycles_t t )
Invalidates one or more cache lines
extern /*@external@*/ void arch_invalidate_dcache( void * addr, size_t n )
Flushes one or more cache lines
extern /*@external@*/ void arch_flush_dcache( void * addr, size_t n )
Sets the currect CPU input frequency
extern /*@external@*/ void arch_set_clock_frequency( unsigned long freq )
Busy waits for at least n microseconds
extern /*@external@*/ void arch_delay_us( unsigned long n )
Suspends the scheduling.
void picoRTOS_suspend()
Resumes the scheduling.
void picoRTOS_resume()
Registers an interrupt/irq to the system
void picoRTOS_register_interrupt( picoRTOS_irq_t irq, picoRTOS_isr_fn fn, void * priv )
Disables an interrupt on the system
void picoRTOS_disable_interrupt( picoRTOS_irq_t irq )
Executes a tick increment
extern /*@exposed@*/ /*@null@*/ picoRTOS_stack_t *picoRTOS_tick( picoRTOS_stack_t * sp )
Architecture port initialization function
extern void arch_init( void )
Suspends the scheduling
extern void arch_suspend( void )
Resumes the scheduling
extern void arch_resume( void )
Starts the first task on the system (idle) and bootstraps the scheduler
extern /*@noreturn@*/ void arch_start_first_task( picoRTOS_stack_t * sp )
Syscall port function
extern void arch_syscall( syscall_t syscall, /*@null@*/ void * priv )
The default idle function/task
extern /*@noreturn@*/ void arch_idle( /*@null@*/ void * null )
Atomic test and set operation
extern /*@unused@*/ picoRTOS_atomic_t arch_test_and_set( picoRTOS_atomic_t * ptr )
Atomic compare and swap operation, will swap the value of *var to new if it’s equal to old
extern /*@unused@*/ picoRTOS_atomic_t arch_compare_and_swap( picoRTOS_atomic_t * var, picoRTOS_atomic_t old, picoRTOS_atomic_t val )
Enables an irq
extern /*@unused@*/ void arch_enable_interrupt( picoRTOS_irq_t irq )
Disables an irq
extern /*@unused@*/ void arch_disable_interrupt( picoRTOS_irq_t irq )
Provides the current cpu counter value
extern picoRTOS_cycles_t arch_counter( arch_counter_t counter, picoRTOS_cycles_t t )
Invalidates one or more cache lines
extern /*@external@*/ void arch_invalidate_dcache( void * addr, size_t n )
Flushes one or more cache lines
extern /*@external@*/ void arch_flush_dcache( void * addr, size_t n )
Sets the currect CPU input frequency
extern /*@external@*/ void arch_set_clock_frequency( unsigned long freq )
Busy waits for at least n microseconds
extern /*@external@*/ void arch_delay_us( unsigned long n )
Suspends the scheduling.
void picoRTOS_suspend( void )
Resumes the scheduling.
void picoRTOS_resume( void )
Registers an interrupt/irq to the system
void picoRTOS_register_interrupt( picoRTOS_irq_t irq, picoRTOS_isr_fn fn, void * priv )
Disables an interrupt on the system
void picoRTOS_disable_interrupt( picoRTOS_irq_t irq )
Initialises picoRTOS (mandatory)
void picoRTOS_init( void )
Initialises a task structure
void picoRTOS_task_init( struct picoRTOS_task * task, picoRTOS_task_fn fn, void * priv, picoRTOS_stack_t * stack, size_t stack_count )
Adds a task to picoRTOS
void picoRTOS_add_task( struct picoRTOS_task * task, picoRTOS_priority_t prio )
Gets the first available priority by ascending order (0 -> n)
picoRTOS_priority_t picoRTOS_get_next_available_priority( void )
Gets the first available priority by descending order (n -> 0)
picoRTOS_priority_t picoRTOS_get_last_available_priority( void )
Starts the scheduling.
void picoRTOS_start( void )
Suspends the scheduling.
void picoRTOS_suspend()
Resumes the scheduling.
void picoRTOS_resume()
Puts the current task to sleep until next tick
void picoRTOS_schedule( void )
Puts the current task to sleep for the specified number of ticks
void picoRTOS_sleep( picoRTOS_tick_t delay )
Puts the current task to sleep until *ref + period is elapsed.
void picoRTOS_sleep_until( picoRTOS_tick_t * ref, picoRTOS_tick_t period )
Kills the current task (suicide)
void picoRTOS_kill( void )
Returns the current task’s priority/identitifer
picoRTOS_pid_t picoRTOS_self( void )
Returns the current system tick/timer
picoRTOS_tick_t picoRTOS_get_tick( void )
Registers an interrupt/irq to the system
void picoRTOS_register_interrupt( picoRTOS_irq_t irq, picoRTOS_isr_fn fn, void * priv )
Enables an interrupt on the system
void picoRTOS_enable_interrupt( picoRTOS_irq_t irq )
Disables an interrupt on the system
void picoRTOS_disable_interrupt( picoRTOS_irq_t irq )
Invalidates the data cache by address(es)
void picoRTOS_invalidate_dcache( /*@unused@*/ void * addr, size_t n )
Flushes the data cache by address(es)
void picoRTOS_flush_dcache( /*@unused@*/ void * addr, size_t n )
Initialises picoRTOS (mandatory)
void picoRTOS_init( void )
Initialises a task structure
void picoRTOS_task_init( struct picoRTOS_task * task, picoRTOS_task_fn fn, void * priv, picoRTOS_stack_t * stack, size_t stack_count )
Adds a task to picoRTOS
void picoRTOS_add_task( struct picoRTOS_task * task, picoRTOS_priority_t prio )
Gets the first available priority by ascending order (0 -> n)
picoRTOS_priority_t picoRTOS_get_next_available_priority( void )
Gets the first available priority by descending order (n -> 0)
picoRTOS_priority_t picoRTOS_get_last_available_priority( void )
Starts the scheduling.
void picoRTOS_start( void )
Suspends the scheduling.
void picoRTOS_suspend( void )
Resumes the scheduling.
void picoRTOS_resume( void )
Puts the current task to sleep until next tick
void picoRTOS_schedule( void )
Puts the current task to sleep for the specified number of ticks
void picoRTOS_sleep( picoRTOS_tick_t delay )
Puts the current task to sleep until *ref + period is elapsed.
void picoRTOS_sleep_until( picoRTOS_tick_t * ref, picoRTOS_tick_t period )
Kills the current task (suicide)
void picoRTOS_kill( void )
Returns the current task’s priority/identitifer
picoRTOS_pid_t picoRTOS_self( void )
Returns the current system tick/timer
picoRTOS_tick_t picoRTOS_get_tick( void )
Registers an interrupt/irq to the system
void picoRTOS_register_interrupt( picoRTOS_irq_t irq, picoRTOS_isr_fn fn, void * priv )
Enables an interrupt on the system
void picoRTOS_enable_interrupt( picoRTOS_irq_t irq )
Disables an interrupt on the system
void picoRTOS_disable_interrupt( picoRTOS_irq_t irq )
Invalidates the data cache by address(es)
void picoRTOS_invalidate_dcache( /*@unused@*/ void * addr, size_t n )
Flushes the data cache by address(es)
void picoRTOS_flush_dcache( /*@unused@*/ void * addr, size_t n )
Initializes an ADC channel
int adc_avr_adc_init( struct adc * ctx, struct adc_avr * parent, size_t channel )
Initializes an ADC block
int adc_avr_init( struct adc_avr * ctx, int base )
Configures an ADC block
int adc_avr_setup( struct adc_avr * ctx, struct adc_avr_settings * settings )
Inits an ADC channel
int adc_nxp_sar_adc_init( struct adc * ctx, struct adc_nxp_sar * parent, size_t channel )
Inits a NXP ADC SAR block
int adc_nxp_sar_init( struct adc_nxp_sar * ctx, int base )
Configures a NXP ADC SAR block
int adc_nxp_sar_setup( struct adc_nxp_sar * ctx, struct adc_nxp_sar_settings * settings )
Inits an ADC channel
int adc_pic32mx_adc_init( struct adc * ctx, struct adc_pic32mx * parent, size_t channel )
Configures an ADC channel
int adc_pic32mx_adc_setup( struct adc * ctx, struct adc_pic32mx_adc_settings * settings )
Init an ADC block
int adc_pic32mx_init( struct adc_pic32mx * ctx, int base )
Configures an ADC block
int adc_pic32mx_setup( struct adc_pic32mx * ctx, struct adc_pic32mx_settings * settings )
Reads a value from the adc
int adc_read( struct adc * ctx, int * data )
Reads multiple values from the adc (oversampling)
int adc_read_multiple( struct adc * ctx, int * data, size_t n )
Initializes an ADC channel
int adc_renesas_ra4_adc_init( struct adc * ctx, struct adc_renesas_ra4 * parent, size_t channel )
Initializes an ADC block
int adc_renesas_ra4_init( struct adc_renesas_ra4 * ctx, int base )
Configures an ADC block
int adc_renesas_ra4_setup( struct adc_renesas_ra4 * ctx, struct adc_renesas_ra4_settings * settings )
Initializes an ADC channel
int adc_rp2040_adc_init( struct adc * ctx, struct adc_rp2040 * parent, size_t channel )
Initializes an ADC block
int adc_rp2040_init( struct adc_rp2040 * ctx, int base )
Initializes an ADC channel
int adc_sam3x_adc_init( struct adc * ctx, struct adc_sam3x * parent, size_t channel )
Initializes an ADC block
int adc_sam3x_init( struct adc_sam3x * ctx, int base )
Initializes an ADC channel
int adc_same5x_init( struct adc * ctx, int base, adc_same5x_channel_t channel )
Configures an ADC
int adc_setup( struct adc * ctx, struct adc_settings * settings )
Inits an ADC channel
int adc_ti_type4_adc_init( struct adc * ctx, struct adc_ti_type4 * parent, size_t channel, size_t sample_count, adc_ti_type4_intflg_t intflg )
Configures an ADC channel
int adc_ti_type4_adc_setup( struct adc * ctx, struct adc_ti_type4_adc_settings * settings )
Inits an ADC block
int adc_ti_type4_init( struct adc_ti_type4 * ctx, int base, int result_base, unsigned long cal_inl_addr )
Configures an ADC block
int adc_ti_type4_setup( struct adc_ti_type4 * ctx, struct adc_ti_type4_settings * settings )
Initializes an ADC channel
int adc_tinyavr_adc_init( struct adc * ctx, struct adc_tinyavr * parent, adc_tinyavr_muxpos_t muxpos )
Initializes an ADC block
int adc_tinyavr_init( struct adc_tinyavr * ctx, int base, clock_id_t clkid )
Configures an ADC block
int adc_tinyavr_setup( struct adc_tinyavr * ctx, struct adc_tinyavr_settings * settings )
Acknowledge the system tick interrupt as an auxiliary core
extern void arch_acknowledge_tick( void )
Atomic compare and swap operation, will swap the value of *var to new if it’s equal to old
extern /*@unused@*/ picoRTOS_atomic_t arch_compare_and_swap( picoRTOS_atomic_t * var, picoRTOS_atomic_t old, picoRTOS_atomic_t val )
Provides the current running core identifier/index
extern picoRTOS_core_t arch_core( void )
Auxiliary core startup function
extern void arch_core_init( picoRTOS_core_t core, picoRTOS_stack_t * stack, size_t stack_count, picoRTOS_stack_t * sp )
Provides the current cpu counter value
extern picoRTOS_cycles_t arch_counter( arch_counter_t counter, picoRTOS_cycles_t t )
Busy waits for at least n microseconds
extern /*@external@*/ void arch_delay_us( unsigned long n )
Disables an irq
extern /*@unused@*/ void arch_disable_interrupt( picoRTOS_irq_t irq )
Enables an irq
extern /*@unused@*/ void arch_enable_interrupt( picoRTOS_irq_t irq )
Flushes one or more cache lines
extern /*@external@*/ void arch_flush_dcache( void * addr, size_t n )
The default idle function/task
extern /*@noreturn@*/ void arch_idle( /*@null@*/ void * null )
Architecture port initialization function
extern void arch_init( void )
Invalidates one or more cache lines
extern /*@external@*/ void arch_invalidate_dcache( void * addr, size_t n )
Propagates the system tick interrupt to auxiliary cores
extern void arch_propagate_tick( void )
Resumes the scheduling
extern void arch_resume( void )
Sets the currect CPU input frequency
extern /*@external@*/ void arch_set_clock_frequency( unsigned long freq )
Disables an interrupt on a specific core or set of cores
extern /*@unused@*/ void arch_smp_disable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Enables an interrupt on a specific core or set of cores
extern /*@unused@*/ void arch_smp_enable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
SMP Architecture port initialization function
extern void arch_smp_init( void )
Locks the SMP spinlock
extern void arch_spin_lock( void )
Unlocks the SMP spinlock
extern void arch_spin_unlock( void )
Starts the first task on the system (idle) and bootstraps the scheduler
extern /*@noreturn@*/ void arch_start_first_task( picoRTOS_stack_t * sp )
Suspends the scheduling
extern void arch_suspend( void )
Syscall port function
extern void arch_syscall( picoRTOS_syscall_t syscall, /*@null@*/ void * priv )
Atomic test and set operation
extern /*@unused@*/ picoRTOS_atomic_t arch_test_and_set( picoRTOS_atomic_t * ptr )
Initializes an ADC channel
int adc_avr_adc_init( struct adc * ctx, struct adc_avr * parent, size_t channel )
Initializes an ADC block
int adc_avr_init( struct adc_avr * ctx, int base )
Configures an ADC block
int adc_avr_setup( struct adc_avr * ctx, struct adc_avr_settings * settings )
Inits an ADC channel
int adc_nxp_sar_adc_init( struct adc * ctx, struct adc_nxp_sar * parent, size_t channel )
Inits a NXP ADC SAR block
int adc_nxp_sar_init( struct adc_nxp_sar * ctx, int base )
Configures a NXP ADC SAR block
int adc_nxp_sar_setup( struct adc_nxp_sar * ctx, struct adc_nxp_sar_settings * settings )
Inits an ADC channel
int adc_pic32mx_adc_init( struct adc * ctx, struct adc_pic32mx * parent, size_t channel )
Configures an ADC channel
int adc_pic32mx_adc_setup( struct adc * ctx, struct adc_pic32mx_adc_settings * settings )
Init an ADC block
int adc_pic32mx_init( struct adc_pic32mx * ctx, int base )
Configures an ADC block
int adc_pic32mx_setup( struct adc_pic32mx * ctx, struct adc_pic32mx_settings * settings )
Reads a value from the adc
int adc_read( struct adc * ctx, int * data )
Reads multiple values from the adc (oversampling)
int adc_read_multiple( struct adc * ctx, int * data, size_t n )
Initializes an ADC channel
int adc_renesas_ra4_adc_init( struct adc * ctx, struct adc_renesas_ra4 * parent, size_t channel )
Initializes an ADC block
int adc_renesas_ra4_init( struct adc_renesas_ra4 * ctx, int base )
Configures an ADC block
int adc_renesas_ra4_setup( struct adc_renesas_ra4 * ctx, struct adc_renesas_ra4_settings * settings )
Initializes an ADC channel
int adc_rp2040_adc_init( struct adc * ctx, struct adc_rp2040 * parent, size_t channel )
Initializes an ADC block
int adc_rp2040_init( struct adc_rp2040 * ctx, int base )
Initializes an ADC channel
int adc_sam3x_adc_init( struct adc * ctx, struct adc_sam3x * parent, size_t channel )
Initializes an ADC block
int adc_sam3x_init( struct adc_sam3x * ctx, int base )
Initializes an ADC channel
int adc_same5x_init( struct adc * ctx, int base, adc_same5x_channel_t channel )
Configures an ADC
int adc_setup( struct adc * ctx, struct adc_settings * settings )
Inits an ADC channel
int adc_ti_type4_adc_init( struct adc * ctx, struct adc_ti_type4 * parent, size_t channel, size_t sample_count, adc_ti_type4_intflg_t intflg )
Configures an ADC channel
int adc_ti_type4_adc_setup( struct adc * ctx, struct adc_ti_type4_adc_settings * settings )
Inits an ADC block
int adc_ti_type4_init( struct adc_ti_type4 * ctx, int base, int result_base, unsigned long cal_inl_addr )
Configures an ADC block
int adc_ti_type4_setup( struct adc_ti_type4 * ctx, struct adc_ti_type4_settings * settings )
Initializes an ADC channel
int adc_tinyavr_adc_init( struct adc * ctx, struct adc_tinyavr * parent, adc_tinyavr_muxpos_t muxpos )
Initializes an ADC block
int adc_tinyavr_init( struct adc_tinyavr * ctx, int base, clock_id_t clkid )
Configures an ADC block
int adc_tinyavr_setup( struct adc_tinyavr * ctx, struct adc_tinyavr_settings * settings )
Acknowledge the system tick interrupt as an auxiliary core
extern void arch_acknowledge_tick( void )
Atomic compare and swap operation, will swap the value of *var to new if it’s equal to old
extern /*@unused@*/ picoRTOS_atomic_t arch_compare_and_swap( picoRTOS_atomic_t * var, picoRTOS_atomic_t old, picoRTOS_atomic_t val )
Provides the current running core identifier/index
extern picoRTOS_core_t arch_core( void )
Auxiliary core startup function
extern void arch_core_init( picoRTOS_core_t core, picoRTOS_stack_t * stack, size_t stack_count, picoRTOS_stack_t * sp )
Provides the current cpu counter value
extern picoRTOS_cycles_t arch_counter( arch_counter_t counter, picoRTOS_cycles_t t )
Busy waits for at least n microseconds
extern /*@external@*/ void arch_delay_us( unsigned long n )
Disables an irq
extern /*@unused@*/ void arch_disable_interrupt( picoRTOS_irq_t irq )
Enables an irq
extern /*@unused@*/ void arch_enable_interrupt( picoRTOS_irq_t irq )
Flushes one or more cache lines
extern /*@external@*/ void arch_flush_dcache( void * addr, size_t n )
The default idle function/task
extern /*@noreturn@*/ void arch_idle( /*@null@*/ void * null )
Architecture port initialization function
extern void arch_init( void )
Invalidates one or more cache lines
extern /*@external@*/ void arch_invalidate_dcache( void * addr, size_t n )
Propagates the system tick interrupt to auxiliary cores
extern void arch_propagate_tick( void )
Resumes the scheduling
extern void arch_resume( void )
Sets the currect CPU input frequency
extern /*@external@*/ void arch_set_clock_frequency( unsigned long freq )
Disables an interrupt on a specific core or set of cores
extern /*@unused@*/ void arch_smp_disable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Enables an interrupt on a specific core or set of cores
extern /*@unused@*/ void arch_smp_enable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
SMP Architecture port initialization function
extern void arch_smp_init( void )
Locks the SMP spinlock
extern void arch_spin_lock( void )
Unlocks the SMP spinlock
extern void arch_spin_unlock( void )
Starts the first task on the system (idle) and bootstraps the scheduler
extern /*@noreturn@*/ void arch_start_first_task( picoRTOS_stack_t * sp )
Suspends the scheduling
extern void arch_suspend( void )
Syscall port function
extern void arch_syscall( syscall_t syscall, /*@null@*/ void * priv )
Atomic test and set operation
extern /*@unused@*/ picoRTOS_atomic_t arch_test_and_set( picoRTOS_atomic_t * ptr )
Registers a message for rx on a CAN interface
int can_accept( struct can * ctx, can_id_t id, can_id_t accept_mask )
Init a FlexCAN interface
int can_nxp_flexcan_init( struct can * ctx, int base, clock_id_t clkid, size_t mailbox_count )
Configures a FlexCAN interface
int can_nxp_flexcan_setup( struct can * ctx, struct can_nxp_flexcan_settings * settings )
Receives a message from the CAN interface
int can_read( struct can * ctx, can_id_t * id, void * buf, size_t n )
Send a RTR frame with the specified ID
int can_request_frame( struct can * ctx, can_id_t id )
Init a CAN interface
int can_sam3x_init( struct can * ctx, int base, clock_id_t clkid )
Configures a CAN interface
int can_setup( struct can * ctx, struct can_settings * settings )
Init a CAN interface
int can_ti_dcan_init( struct can * ctx, long base, clock_id_t clkid )
Sends a message on the CAN interface
int can_write( struct can * ctx, can_id_t id, const void * buf, size_t n )
Initialises the f28379x clock system
int clock_f28379x_init( struct clock_settings * settings )
Disables a peripheral clock
int clock_f28379x_pclk_disable( clock_f28379x_pclk_t pclk )
Enables a peripheral clock
int clock_f28379x_pclk_enable( clock_f28379x_pclk_t pclk )
Disables a particular clock
int clock_gd32vf103_disable( clock_gd32vf103_clk_t clk )
Enables a particular clock
int clock_gd32vf103_enable( clock_gd32vf103_clk_t clk )
Initialises the GD32VF103 clock system
int clock_gd32vf103_init( struct clock_settings * settings )
Gets a clock frequency (in hz)
clock_freq_t clock_get_freq( clock_id_t clkid )
Inits the MPC574xx clock subsystem
int clock_mpc574xx_init( struct clock_settings * settings )
Configures the LP_PC register (Low Power)
int clock_mpc574xx_set_lp_pc( size_t index, int flags )
Configured the Low Power clock mode of a peripheral
int clock_mpc574xx_set_pctl_lp_cfg( clock_mpc574xx_pctl_t pctl, size_t lp_pc )
Configured the RUN clock mode of a peripheral
int clock_mpc574xx_set_pctl_run_cfg( clock_mpc574xx_pctl_t pctl, size_t run_pc )
Configures the RUN_PC register
int clock_mpc574xx_set_run_pc( size_t index, int flags )
Inits the SIU clock subsystem
int clock_nxp_siu_init( struct clock_settings * settings )
Initializes the PIC32MX clock system
int clock_pic32mx_init( struct clock_settings * settings )
Disable a particular PB clock
int clock_pic32mx_pbclk_disable( clock_id_t clkid )
Enables a particular PB clock
int clock_pic32mx_pbclk_enable( clock_id_t clkid, unsigned long pbdiv )
Intializes the Renesas RA4 clock system
int clock_renesas_ra4_init( struct clock_settings * settings )
Sends power/clock to the selected module
int clock_renesas_ra4_module_start( size_t module )
Stops power/clock to the selected module
int clock_renesas_ra4_module_stop( size_t module )
Disables a particular clock
int clock_rp2040_disable( clock_id_t clkid )
Enables a particular clock
int clock_rp2040_enable( clock_id_t clkid )
Intializes the rp2040 clock system
int clock_rp2040_init( struct clock_settings * settings )
Disable a particular clock
int clock_sam3x_pmc_disable( clock_id_t clkid )
Enables a particular clock
int clock_sam3x_pmc_enable( clock_id_t clkid, clock_sam3x_pmc_periph_div_t periph_div )
Initialises the SAM3X clock system
int clock_sam3x_pmc_init( struct clock_settings * settings )
Disables the SAME5x DFLL clock
int clock_same5x_dfll_disable( void )
Enables the SAME5x DFLL clock
int clock_same5x_dfll_enable( void )
Configures the SAME5x DFLL clock
int clock_same5x_dfll_setup( struct clock_same5x_dfll_settings * settings )
Disables a SAME5x clock
int clock_same5x_disable( clock_id_t clkid )
Disables a SAME5x DPLL
int clock_same5x_dpll_disable( size_t index )
Enables a SAME5x DPLL
int clock_same5x_dpll_enable( size_t index )
Configures a SAME5x DPLL
int clock_same5x_dpll_setup( size_t index, struct clock_same5x_dpll_settings * settings )
Enables a SAME5x clock
int clock_same5x_enable( clock_id_t clkid )
Disables a SAME5x GCLK generator
int clock_same5x_gclk_generator_disable( size_t index )
Enables a SAME5x GCLK generator
int clock_same5x_gclk_generator_enable( size_t index )
Configures a SAME5x GCLK generator
int clock_same5x_gclk_generator_setup( size_t index, struct clock_same5x_gclk_settings * settings )
Resets the SAME5x clock system
int clock_same5x_gclk_reset( void )
Disables a SAME5x MCLK gate
int clock_same5x_mclk_disable( clock_same5x_mclk_t mclk )
Enables a SAME5x MCLK gate
int clock_same5x_mclk_enable( clock_same5x_mclk_t mclk )
Configures a SAME5x clock / attach a clock id to a gclk generator
int clock_same5x_setup( clock_id_t clkid, size_t gclk_index )
Disables a specific clock
int clock_stm32h7xx_disable( clock_stm32h7xx_axb_t clk )
Enables a specific clock
int clock_stm32h7xx_enable( clock_stm32h7xx_axb_t clk )
Initialises the RCC clock system
int clock_stm32h7xx_init( struct clock_settings * settings )
Selects the kernel clock for a specific peripheral
int clock_stm32h7xx_ker_sel( clock_stm32h7xx_ker_t ker, unsigned int value )
Intializes the tinyAVR 1-series clock system
int clock_tinyavr_init( struct clock_settings * settings )
Registers a message for rx on a CAN interface
int can_accept( struct can * ctx, can_id_t id, can_id_t accept_mask )
Init a FlexCAN interface
int can_nxp_flexcan_init( struct can * ctx, int base, clock_id_t clkid, size_t mailbox_count )
Configures a FlexCAN interface
int can_nxp_flexcan_setup( struct can * ctx, struct can_nxp_flexcan_settings * settings )
Receives a message from the CAN interface
int can_read( struct can * ctx, can_id_t * id, void * buf, size_t n )
Send a RTR frame with the specified ID
int can_request_frame( struct can * ctx, can_id_t id )
Init a CAN interface
int can_sam3x_init( struct can * ctx, int base, clock_id_t clkid )
Configures a CAN interface
int can_setup( struct can * ctx, struct can_settings * settings )
Init a CAN interface
int can_ti_dcan_init( struct can * ctx, long base, clock_id_t clkid )
Sends a message on the CAN interface
int can_write( struct can * ctx, can_id_t id, const void * buf, size_t n )
Intializes the cy7c6801xa clock system
int clock_cy7c6801xa_init( struct clock_settings * settings )
Initialises the f28379x clock system
int clock_f28379x_init( struct clock_settings * settings )
Disables a peripheral clock
int clock_f28379x_pclk_disable( clock_f28379x_pclk_t pclk )
Enables a peripheral clock
int clock_f28379x_pclk_enable( clock_f28379x_pclk_t pclk )
Disables a particular clock
int clock_gd32vf103_disable( clock_gd32vf103_clk_t clk )
Enables a particular clock
int clock_gd32vf103_enable( clock_gd32vf103_clk_t clk )
Initialises the GD32VF103 clock system
int clock_gd32vf103_init( struct clock_settings * settings )
Gets a clock frequency (in hz)
clock_freq_t clock_get_freq( clock_id_t clkid )
Inits the MPC574xx clock subsystem
int clock_mpc574xx_init( struct clock_settings * settings )
Configures the LP_PC register (Low Power)
int clock_mpc574xx_set_lp_pc( size_t index, int flags )
Configured the Low Power clock mode of a peripheral
int clock_mpc574xx_set_pctl_lp_cfg( clock_mpc574xx_pctl_t pctl, size_t lp_pc )
Configured the RUN clock mode of a peripheral
int clock_mpc574xx_set_pctl_run_cfg( clock_mpc574xx_pctl_t pctl, size_t run_pc )
Configures the RUN_PC register
int clock_mpc574xx_set_run_pc( size_t index, int flags )
Intializes the n76e003 clock system
int clock_n76e003_init( struct clock_settings * settings )
Inits the SIU clock subsystem
int clock_nxp_siu_init( struct clock_settings * settings )
Initializes the PIC32MX clock system
int clock_pic32mx_init( struct clock_settings * settings )
Disable a particular PB clock
int clock_pic32mx_pbclk_disable( clock_id_t clkid )
Enables a particular PB clock
int clock_pic32mx_pbclk_enable( clock_id_t clkid, unsigned long pbdiv )
Intializes the Renesas RA4 clock system
int clock_renesas_ra4_init( struct clock_settings * settings )
Sends power/clock to the selected module
int clock_renesas_ra4_module_start( size_t module )
Stops power/clock to the selected module
int clock_renesas_ra4_module_stop( size_t module )
Disables a particular clock
int clock_rp2040_disable( clock_id_t clkid )
Enables a particular clock
int clock_rp2040_enable( clock_id_t clkid )
Intializes the rp2040 clock system
int clock_rp2040_init( struct clock_settings * settings )
Disable a particular clock
int clock_sam3x_pmc_disable( clock_id_t clkid )
Enables a particular clock
int clock_sam3x_pmc_enable( clock_id_t clkid, clock_sam3x_pmc_periph_div_t periph_div )
Initialises the SAM3X clock system
int clock_sam3x_pmc_init( struct clock_settings * settings )
Disables the SAME5x DFLL clock
int clock_same5x_dfll_disable( void )
Enables the SAME5x DFLL clock
int clock_same5x_dfll_enable( void )
Configures the SAME5x DFLL clock
int clock_same5x_dfll_setup( struct clock_same5x_dfll_settings * settings )
Disables a SAME5x clock
int clock_same5x_disable( clock_id_t clkid )
Disables a SAME5x DPLL
int clock_same5x_dpll_disable( size_t index )
Enables a SAME5x DPLL
int clock_same5x_dpll_enable( size_t index )
Configures a SAME5x DPLL
int clock_same5x_dpll_setup( size_t index, struct clock_same5x_dpll_settings * settings )
Enables a SAME5x clock
int clock_same5x_enable( clock_id_t clkid )
Disables a SAME5x GCLK generator
int clock_same5x_gclk_generator_disable( size_t index )
Enables a SAME5x GCLK generator
int clock_same5x_gclk_generator_enable( size_t index )
Configures a SAME5x GCLK generator
int clock_same5x_gclk_generator_setup( size_t index, struct clock_same5x_gclk_settings * settings )
Resets the SAME5x clock system
int clock_same5x_gclk_reset( void )
Disables a SAME5x MCLK gate
int clock_same5x_mclk_disable( clock_same5x_mclk_t mclk )
Enables a SAME5x MCLK gate
int clock_same5x_mclk_enable( clock_same5x_mclk_t mclk )
Configures a SAME5x clock / attach a clock id to a gclk generator
int clock_same5x_setup( clock_id_t clkid, size_t gclk_index )
Disables a specific clock
int clock_stm32h7xx_disable( clock_stm32h7xx_axb_t clk )
Enables a specific clock
int clock_stm32h7xx_enable( clock_stm32h7xx_axb_t clk )
Initialises the RCC clock system
int clock_stm32h7xx_init( struct clock_settings * settings )
Selects the kernel clock for a specific peripheral
int clock_stm32h7xx_ker_sel( clock_stm32h7xx_ker_t ker, unsigned int value )
Intializes the tinyAVR 1-series clock system
int clock_tinyavr_init( struct clock_settings * settings )
Initialises a GD32VF103 DMA channel
int dma_gd32vf103_init( struct dma * ctx, int base, size_t channel )
Initialiases a NXP eDMA controller channel
int dma_nxp_edma_dma_init( struct dma * ctx, struct dma_nxp_edma * parent, size_t channel )
Initialiases a NXP eDMA controller block
int dma_nxp_edma_init( struct dma_nxp_edma * ctx, int base )
Initializes a DMA channel
int dma_r2040_init( struct dma * ctx, int base, size_t channel, dma_rp2040_treq_sel_t treq_sel )
Initialiases a SAME5x DMAC controller channel
int dma_same5x_dma_init( /*@out@*/ struct dma * ctx, struct dma_same5x * parent, size_t channel, dma_same5x_trigsrc_t trigsrc )
Initialiases a SAME5x DMAC controller
int dma_same5x_init( struct dma_same5x * ctx, int base )
Configures a DMA for external trigger
int dma_setup( struct dma * ctx, struct dma_xfer * xfer )
Initialises a STM32H7xx DMA channel
int dma_stm32h7xx_init( struct dma * ctx, int base, size_t channel )
Inits a DMA channel
int dma_ti_f28x_init( struct dma * ctx, int base, size_t channel, dma_ti_f28x_chsrcsel_t chsrcsel )
Starts a DMA transfer
int dma_xfer( struct dma * ctx, struct dma_xfer * xfer )
Polls a DMA for end of transfer
int dma_xfer_done( struct dma * ctx )
Inits the DMAMUX channel
int dmamux_stm32h7xx_init( struct dmamux * ctx, int base, size_t channel )
Configures and DMAXMUX DMAREQ_ID
int dmamux_stm32h7xx_set_dmareq_id( struct dmamux * ctx, unsigned long id )
Starts a DMA scatter-gather transfer
int dmasg_xfer( struct dmasg * ctx, struct dmasg_xfer * xfer )
Initialises a GD32VF103 DMA channel
int dma_gd32vf103_init( struct dma * ctx, int base, size_t channel )
Initialiases a NXP eDMA controller channel
int dma_nxp_edma_dma_init( struct dma * ctx, struct dma_nxp_edma * parent, size_t channel )
Initialiases a NXP eDMA controller block
int dma_nxp_edma_init( struct dma_nxp_edma * ctx, int base )
Initializes a DMA channel
int dma_r2040_init( struct dma * ctx, int base, size_t channel, dma_rp2040_treq_sel_t treq_sel )
Initialiases a SAME5x DMAC controller channel
int dma_same5x_dma_init( /*@out@*/ struct dma * ctx, struct dma_same5x * parent, size_t channel, dma_same5x_trigsrc_t trigsrc )
Initialiases a SAME5x DMAC controller
int dma_same5x_init( struct dma_same5x * ctx, int base )
Configures a DMA for external trigger
int dma_setup( struct dma * ctx, struct dma_xfer * xfer )
Initialises a STM32H7xx DMA channel
int dma_stm32h7xx_init( struct dma * ctx, int base, size_t channel )
Inits a DMA channel
int dma_ti_f28x_init( struct dma * ctx, int base, size_t channel, dma_ti_f28x_chsrcsel_t chsrcsel )
Starts a DMA transfer
int dma_xfer( struct dma * ctx, struct dma_xfer * xfer )
Polls a DMA for end of transfer
int dma_xfer_done( struct dma * ctx )
Inits the DMAMUX channel
int dmamux_stm32h7xx_init( struct dmamux * ctx, int base, size_t channel )
Configures and DMAXMUX DMAREQ_ID
int dmamux_stm32h7xx_set_dmareq_id( struct dmamux * ctx, unsigned long id )
Starts a DMA scatter-gather transfer
int dmasg_xfer( struct dmasg * ctx, struct dmasg_xfer * xfer )
Initializes an EEPROM block
int eeprom_avr_init( struct eeprom * ctx, int base, int SPMCSR_base )
Erase data from EEPROM
int eeprom_erase( struct eeprom * ctx, size_t addr, size_t n )
Reads value from EEPROM
int eeprom_read( struct eeprom * ctx, size_t addr, void * buf, size_t n )
Write values to EEPROM
int eeprom_write( struct eeprom * ctx, size_t addr, const void * buf, size_t n )
Initializes an EEPROM block
int eeprom_avr_init( struct eeprom * ctx, int base, int SPMCSR_base )
Erase data from EEPROM
int eeprom_erase( struct eeprom * ctx, size_t addr, size_t n )
Reads value from EEPROM
int eeprom_read( struct eeprom * ctx, size_t addr, void * buf, size_t n )
Write values to EEPROM
int eeprom_write( struct eeprom * ctx, size_t addr, const void * buf, size_t n )
Checks if a flash block is blank/empty
int flash_blankcheck( struct flash * ctx, size_t block )
Erases a sector from flash
int flash_erase( struct flash * ctx, size_t block )
Initializes a GD32VF103 FMC
int flash_gd32vf103_init( struct flash * ctx, int base, size_t block_count )
Gets the memory address of the specified block
int flash_get_block_addr( struct flash * ctx, size_t block )
Gets the minimal erase size for the specified block
int flash_get_erase_size( struct flash * ctx, size_t block )
Gets the number of blocks present in the flash
int flash_get_nblocks( struct flash * ctx )
Gets the minimal write size for the specified block
int flash_get_write_size( struct flash * ctx, size_t block )
Protects a block in flash
int flash_lock( struct flash * ctx, size_t block )
Initializes a pic32mx flash controller (RTSP)
int flash_pic32mx_init( struct flash * ctx, int base, size_t block_count )
Initializes a NVMCTRL flash controller
int flash_same5x_init( struct flash * ctx, int base )
Unprotects a flash block
int flash_unlock( struct flash * ctx, size_t block )
Writes data to flash
int flash_write( struct flash * ctx, size_t addr, const void * data, size_t n )
Checks if a flash block is blank/empty
int flash_blankcheck( struct flash * ctx, size_t block )
Erases a sector from flash
int flash_erase( struct flash * ctx, size_t block )
Initializes a GD32VF103 FMC
int flash_gd32vf103_init( struct flash * ctx, int base, size_t block_count )
Gets the memory address of the specified block
int flash_get_block_addr( struct flash * ctx, size_t block )
Gets the minimal erase size for the specified block
int flash_get_erase_size( struct flash * ctx, size_t block )
Gets the number of blocks present in the flash
int flash_get_nblocks( struct flash * ctx )
Gets the minimal write size for the specified block
int flash_get_write_size( struct flash * ctx, size_t block )
Protects a block in flash
int flash_lock( struct flash * ctx, size_t block )
Initializes a pic32mx flash controller (RTSP)
int flash_pic32mx_init( struct flash * ctx, int base, size_t block_count )
Initializes a NVMCTRL flash controller
int flash_same5x_init( struct flash * ctx, int base )
Unprotects a flash block
int flash_unlock( struct flash * ctx, size_t block )
Writes data to flash
int flash_write( struct flash * ctx, size_t addr, const void * data, size_t n )
Initializes a GPIO
int gpio_avr_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_gd32vf103_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_nxp_siu_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_nxp_siul2_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_pic32mx_init( struct gpio * ctx, int base, size_t pin )
Read value from a gpio
bool gpio_read( struct gpio * ctx )
Initializes a GPIO
int gpio_renesas_ra4_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_rp2040_sio_init( struct gpio * ctx, int base, size_t pin, gpio_rp2040_sio_dir_t dir )
Initializes a GPIO
int gpio_sam3x_pio_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_same5x_init( struct gpio * ctx, int base, size_t pin )
Configures a gpio
int gpio_setup( struct gpio * ctx, struct gpio_settings * settings )
Initializes a GPIO
int gpio_stm32h7xx_init( struct gpio * ctx, int base, size_t pin )
Initialises a GPIO
int gpio_ti_f28x_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_tinyavr_init( struct gpio * ctx, int base, size_t pin )
Toggles a gpio value
void gpio_toggle( struct gpio * ctx )
Sets a gpio to a value
void gpio_write( struct gpio * ctx, bool value )
Initializes a GPIO
int gpio_avr_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_gd32vf103_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_nxp_siu_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_nxp_siul2_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_pic32mx_init( struct gpio * ctx, int base, size_t pin )
Read value from a gpio
bool gpio_read( struct gpio * ctx )
Initializes a GPIO
int gpio_renesas_ra4_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_rp2040_sio_init( struct gpio * ctx, int base, size_t pin, gpio_rp2040_sio_dir_t dir )
Initializes a GPIO
int gpio_sam3x_pio_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_same5x_init( struct gpio * ctx, int base, size_t pin )
Configures a gpio
int gpio_setup( struct gpio * ctx, struct gpio_settings * settings )
Initializes a GPIO
int gpio_stm32h7xx_init( struct gpio * ctx, int base, size_t pin )
Initialises a GPIO
int gpio_ti_f28x_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_tinyavr_init( struct gpio * ctx, int base, size_t pin )
Toggles a gpio value
void gpio_toggle( struct gpio * ctx )
Sets a gpio to a value
void gpio_write( struct gpio * ctx, bool value )
Measures the duty cycle of a PWM
int ipwm_get_duty_cycle( struct ipwm * ctx, pwm_duty_cycle_t * duty_cycle )
Measures the period of a train of pulses
int ipwm_get_period( struct ipwm * ctx, pwm_period_us_t * period )
Measures the duty cycle of a PWM
int ipwm_get_duty_cycle( struct ipwm * ctx, pwm_duty_cycle_t * duty_cycle )
Measures the period of a train of pulses
int ipwm_get_period( struct ipwm * ctx, pwm_period_us_t * period )
Reads data from a LIN interface
int lin_read( struct lin * ctx, uint8_t * id, void * buf, size_t n )
Configures a LIN interface
int lin_setup( struct lin * ctx, struct lin_settings * settings )
Writes data to the LIN interface
int lin_write( struct lin * ctx, uint8_t id, const void * buf, size_t n )
Reads data from a LIN interface
int lin_read( struct lin * ctx, uint8_t * id, void * buf, size_t n )
Configures a LIN interface
int lin_setup( struct lin * ctx, struct lin_settings * settings )
Writes data to the LIN interface
int lin_write( struct lin * ctx, uint8_t id, const void * buf, size_t n )
Initializes multiplexing on a port
int mux_avr_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_avr_input( struct mux * ctx, size_t pin )
Sets the selected pin to output
int mux_avr_output( struct mux * ctx, size_t pin, bool value )
Sets a pin as atlernate / AFIO
int mux_gd32vf103_afio( struct mux * ctx, size_t pin, mux_gd32vf103_afio_t mode, mux_gd32vf103_speed_t speed )
Remaps an AFIO (see doc)
int mux_gd32vf103_afio_remap( mux_gd32vf103_afio_remap_t remap, uint32_t value )
Sets a pin as analog input
int mux_gd32vf103_analog( struct mux * ctx, size_t pin )
Initializes a gpio port for muxing
int mux_gd32vf103_init( struct mux * ctx, int base )
Sets a pin as input
int mux_gd32vf103_input( struct mux * ctx, size_t pin, mux_gd32vf103_input_t mode )
Sets a pin as output
int mux_gd32vf103_output( struct mux * ctx, size_t pin, mux_gd32vf103_output_t mode, mux_gd32vf103_speed_t speed )
Sets the IMUX MUXSEL value (see IO Signal Description for more details)
int mux_nxp_siu_imux_muxsel( struct mux * ctx, size_t reg, size_t muxsel, size_t value )
Initializes multiplexing on a port
int mux_nxp_siu_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_nxp_siu_input( struct mux * ctx, size_t pin, mux_nxp_siu_t mux )
Sets the selected pin to output
int mux_nxp_siu_output( struct mux * ctx, size_t pin, mux_nxp_siu_t mux )
Pulls the selected pin down
int mux_nxp_siu_pull_down( struct mux * ctx, size_t pin )
Pulls the selected pin up
int mux_nxp_siu_pull_up( struct mux * ctx, size_t pin )
Sets the selected pin to analog input
int mux_nxp_siul2_analog( struct mux * ctx, size_t pin )
Initializes multiplexing on a port
int mux_nxp_siul2_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_nxp_siul2_input( struct mux * ctx, size_t pin, mux_nxp_siul2_t mux, size_t imcr )
Sets the selected pin to output
int mux_nxp_siul2_output( struct mux * ctx, size_t pin, mux_nxp_siul2_t mux )
Pulls the selected pin down
int mux_nxp_siul2_pull_down( struct mux * ctx, size_t pin )
Pulls the selected pin up
int mux_nxp_siul2_pull_up( struct mux * ctx, size_t pin )
Configures a pin for analog input
int mux_pic32mx_analog( struct mux_pic32mx * ctx, size_t pin )
Initialises a mux PORT
int mux_pic32mx_init( struct mux_pic32mx * ctx, int base )
Configures a pin for digital input
int mux_pic32mx_input( struct mux_pic32mx * ctx, size_t pin )
Configures a pin for digital output
int mux_pic32mx_output( struct mux_pic32mx * ctx, size_t pin )
Configures a PPS input
int mux_pic32mx_peripheral_pin_select_input( mux_pic32mx_ppsi_t ppsi, size_t opt )
Configures a PPS output
int mux_pic32mx_peripheral_pin_select_output( mux_pic32mx_ppso_t ppso, size_t opt )
Adds a pull down to the selected pin
int mux_pic32mx_pull_down( struct mux_pic32mx * ctx, size_t pin )
Adds a pull up to the selected pin
int mux_pic32mx_pull_up( struct mux_pic32mx * ctx, size_t pin )
Set port pin as analog input
int mux_renesas_ra4_analog( struct mux * ctx, size_t pin )
Initializes multiplexing on a port
int mux_renesas_ra4_init( struct mux * ctx, int base, size_t port )
Set port pin as GPIO input
int mux_renesas_ra4_input( struct mux * ctx, size_t pin )
Set port pin as GPIO output
int mux_renesas_ra4_output( struct mux * ctx, size_t pin )
Set port pin as special peripheral
int mux_renesas_ra4_periph( struct mux * ctx, size_t pin, size_t psel )
Pulls up input pin
int mux_renesas_ra4_pull_up( struct mux * ctx, size_t pin )
Initializes a port for muxing
int mux_rp2040_init( struct mux * ctx, int io_base, int pads_base )
Sets a pin as input only
int mux_rp2040_input( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Sets a pin as input AND output
int mux_rp2040_io( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Sets a pin as output only
int mux_rp2040_output( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Overrides a specific pin value
int mux_rp2040_override( struct mux * ctx, size_t pin, mux_rp2040_over_t over )
Pulls down a specific mux pin
int mux_rp2040_pull_down( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_rp2040_pull_up( struct mux * ctx, size_t pin )
Sets the drive strength of a pin
int mux_rp2040_set_drive( struct mux * ctx, size_t pin, mux_rp2040_drive_t drive )
Initializes a mux port
int mux_sam3x_pio_init( struct mux_sam3x_pio * ctx, int base )
Sets a pin to input only
int mux_sam3x_pio_input( struct mux_sam3x_pio * ctx, size_t pin, mux_sam3x_pio_t mux )
Sets a pin to output only
int mux_sam3x_pio_output( struct mux_sam3x_pio * ctx, size_t pin, mux_sam3x_pio_t mux )
Pulls up a specific pin
int mux_sam3x_pio_pull_up( struct mux_sam3x_pio * ctx, size_t pin )
Initializes a mux port
int mux_same5x_init( struct mux_same5x * ctx, int base )
Sets a pin to input only
int mux_same5x_input( struct mux_same5x * ctx, size_t pin, mux_pmux_t pmux )
Sets a pin to output only
int mux_same5x_output( struct mux_same5x * ctx, size_t pin, mux_pmux_t pmux )
Pulls a specific pin down
int mux_same5x_pull_down( struct mux_same5x * ctx, size_t pin )
Pulls a specific pin up
int mux_same5x_pull_up( struct mux_same5x * ctx, size_t pin )
Sets a pin as alternate function pin
int mux_stm32h7xx_alt( struct mux * ctx, size_t pin, size_t alt )
Sets a pin as analog input
int mux_stm32h7xx_analog( struct mux * ctx, size_t pin )
Initializes a port for muxing
int mux_stm32h7xx_init( struct mux * ctx, int base )
Sets a pin as discrete input
int mux_stm32h7xx_input( struct mux * ctx, size_t pin )
Sets a pin as discrete output
int mux_stm32h7xx_output( struct mux * ctx, size_t pin )
Pulls down a specific mux pin
int mux_stm32h7xx_pull_down( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_stm32h7xx_pull_up( struct mux * ctx, size_t pin )
Initialises a multiplexer block
int mux_ti_f28x_init( struct mux * ctx, int base )
Configures a pin as input
int mux_ti_f28x_input( struct mux * ctx, size_t pin, mux_ti_f28x_t gmux, mux_ti_f28x_t mux )
Configures a pin as output
int mux_ti_f28x_output( struct mux * ctx, size_t pin, mux_ti_f28x_t gmux, mux_ti_f28x_t mux )
Pulls up a specific pin
int mux_ti_f28x_pull_up( struct mux * ctx, size_t pin )
Configures the QSEL value of a pin
int mux_ti_f28x_set_qsel( struct mux * ctx, size_t pin, mux_ti_f28x_qsel_t qsel )
Initializes a port for muxing
int mux_tinyavr_init( struct mux * ctx, int base )
Sets a pin as input only
int mux_tinyavr_input( struct mux * ctx, size_t pin )
Sets a pin as output only
int mux_tinyavr_output( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_tinyavr_pull_up( struct mux * ctx, size_t pin )
Initializes multiplexing on a port
int mux_avr_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_avr_input( struct mux * ctx, size_t pin )
Sets the selected pin to output
int mux_avr_output( struct mux * ctx, size_t pin, bool value )
Sets a pin as atlernate / AFIO
int mux_gd32vf103_afio( struct mux * ctx, size_t pin, mux_gd32vf103_afio_t mode, mux_gd32vf103_speed_t speed )
Remaps an AFIO (see doc)
int mux_gd32vf103_afio_remap( mux_gd32vf103_afio_remap_t remap, uint32_t value )
Sets a pin as analog input
int mux_gd32vf103_analog( struct mux * ctx, size_t pin )
Initializes a gpio port for muxing
int mux_gd32vf103_init( struct mux * ctx, int base )
Sets a pin as input
int mux_gd32vf103_input( struct mux * ctx, size_t pin, mux_gd32vf103_input_t mode )
Sets a pin as output
int mux_gd32vf103_output( struct mux * ctx, size_t pin, mux_gd32vf103_output_t mode, mux_gd32vf103_speed_t speed )
Sets the IMUX MUXSEL value (see IO Signal Description for more details)
int mux_nxp_siu_imux_muxsel( struct mux * ctx, size_t reg, size_t muxsel, size_t value )
Initializes multiplexing on a port
int mux_nxp_siu_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_nxp_siu_input( struct mux * ctx, size_t pin, mux_nxp_siu_t mux )
Sets the selected pin to output
int mux_nxp_siu_output( struct mux * ctx, size_t pin, mux_nxp_siu_t mux )
Pulls the selected pin down
int mux_nxp_siu_pull_down( struct mux * ctx, size_t pin )
Pulls the selected pin up
int mux_nxp_siu_pull_up( struct mux * ctx, size_t pin )
Sets the selected pin to analog input
int mux_nxp_siul2_analog( struct mux * ctx, size_t pin )
Initializes multiplexing on a port
int mux_nxp_siul2_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_nxp_siul2_input( struct mux * ctx, size_t pin, mux_nxp_siul2_t mux, size_t imcr )
Sets the selected pin to output
int mux_nxp_siul2_output( struct mux * ctx, size_t pin, mux_nxp_siul2_t mux )
Pulls the selected pin down
int mux_nxp_siul2_pull_down( struct mux * ctx, size_t pin )
Pulls the selected pin up
int mux_nxp_siul2_pull_up( struct mux * ctx, size_t pin )
Configures a pin for analog input
int mux_pic32mx_analog( struct mux_pic32mx * ctx, size_t pin )
Initialises a mux PORT
int mux_pic32mx_init( struct mux_pic32mx * ctx, int base )
Configures a pin for digital input
int mux_pic32mx_input( struct mux_pic32mx * ctx, size_t pin )
Configures a pin for digital output
int mux_pic32mx_output( struct mux_pic32mx * ctx, size_t pin )
Configures a PPS input
int mux_pic32mx_peripheral_pin_select_input( mux_pic32mx_ppsi_t ppsi, size_t opt )
Configures a PPS output
int mux_pic32mx_peripheral_pin_select_output( mux_pic32mx_ppso_t ppso, size_t opt )
Adds a pull down to the selected pin
int mux_pic32mx_pull_down( struct mux_pic32mx * ctx, size_t pin )
Adds a pull up to the selected pin
int mux_pic32mx_pull_up( struct mux_pic32mx * ctx, size_t pin )
Set port pin as analog input
int mux_renesas_ra4_analog( struct mux * ctx, size_t pin )
Initializes multiplexing on a port
int mux_renesas_ra4_init( struct mux * ctx, int base, size_t port )
Set port pin as GPIO input
int mux_renesas_ra4_input( struct mux * ctx, size_t pin )
Set port pin as GPIO output
int mux_renesas_ra4_output( struct mux * ctx, size_t pin )
Set port pin as special peripheral
int mux_renesas_ra4_periph( struct mux * ctx, size_t pin, size_t psel )
Pulls up input pin
int mux_renesas_ra4_pull_up( struct mux * ctx, size_t pin )
Initializes a port for muxing
int mux_rp2040_init( struct mux * ctx, int io_base, int pads_base )
Sets a pin as input only
int mux_rp2040_input( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Sets a pin as input AND output
int mux_rp2040_io( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Sets a pin as output only
int mux_rp2040_output( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Overrides a specific pin value
int mux_rp2040_override( struct mux * ctx, size_t pin, mux_rp2040_over_t over )
Pulls down a specific mux pin
int mux_rp2040_pull_down( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_rp2040_pull_up( struct mux * ctx, size_t pin )
Sets the drive strength of a pin
int mux_rp2040_set_drive( struct mux * ctx, size_t pin, mux_rp2040_drive_t drive )
Initializes a mux port
int mux_sam3x_pio_init( struct mux_sam3x_pio * ctx, int base )
Sets a pin to input only
int mux_sam3x_pio_input( struct mux_sam3x_pio * ctx, size_t pin, mux_sam3x_pio_t mux )
Sets a pin to output only
int mux_sam3x_pio_output( struct mux_sam3x_pio * ctx, size_t pin, mux_sam3x_pio_t mux )
Pulls up a specific pin
int mux_sam3x_pio_pull_up( struct mux_sam3x_pio * ctx, size_t pin )
Initializes a mux port
int mux_same5x_init( struct mux_same5x * ctx, int base )
Sets a pin to input only
int mux_same5x_input( struct mux_same5x * ctx, size_t pin, mux_pmux_t pmux )
Sets a pin to output only
int mux_same5x_output( struct mux_same5x * ctx, size_t pin, mux_pmux_t pmux )
Pulls a specific pin down
int mux_same5x_pull_down( struct mux_same5x * ctx, size_t pin )
Pulls a specific pin up
int mux_same5x_pull_up( struct mux_same5x * ctx, size_t pin )
Sets a pin as alternate function pin
int mux_stm32h7xx_alt( struct mux * ctx, size_t pin, size_t alt )
Sets a pin as analog input
int mux_stm32h7xx_analog( struct mux * ctx, size_t pin )
Initializes a port for muxing
int mux_stm32h7xx_init( struct mux * ctx, int base )
Sets a pin as discrete input
int mux_stm32h7xx_input( struct mux * ctx, size_t pin )
Sets a pin as discrete output
int mux_stm32h7xx_output( struct mux * ctx, size_t pin )
Pulls down a specific mux pin
int mux_stm32h7xx_pull_down( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_stm32h7xx_pull_up( struct mux * ctx, size_t pin )
Initialises a multiplexer block
int mux_ti_f28x_init( struct mux * ctx, int base )
Configures a pin as input
int mux_ti_f28x_input( struct mux * ctx, size_t pin, mux_ti_f28x_t gmux, mux_ti_f28x_t mux )
Configures a pin as output
int mux_ti_f28x_output( struct mux * ctx, size_t pin, mux_ti_f28x_t gmux, mux_ti_f28x_t mux )
Pulls up a specific pin
int mux_ti_f28x_pull_up( struct mux * ctx, size_t pin )
Configures the QSEL value of a pin
int mux_ti_f28x_set_qsel( struct mux * ctx, size_t pin, mux_ti_f28x_qsel_t qsel )
Initializes a port for muxing
int mux_tinyavr_init( struct mux * ctx, int base )
Sets a pin as input only
int mux_tinyavr_input( struct mux * ctx, size_t pin )
Sets a pin as output only
int mux_tinyavr_output( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_tinyavr_pull_up( struct mux * ctx, size_t pin )
Locks system protected registers
void pic32mx_lock( void )
Unlocks system protected registers
void pic32mx_unlock( void )
Adds a task to picoRTOS
void picoRTOS_add_task( struct picoRTOS_task * task, picoRTOS_priority_t prio )
Broadcasts a condition to a all waiting threads
void picoRTOS_cond_broadcast( struct picoRTOS_cond * cond )
Initialises a condition
void picoRTOS_cond_init( struct picoRTOS_cond * cond )
Signals a condition to a single waiting thread
void picoRTOS_cond_signal( struct picoRTOS_cond * cond )
Waits for a condition to be signaled
void picoRTOS_cond_wait( struct picoRTOS_cond * cond, struct picoRTOS_mutex * mutex )
Disables an interrupt on the system
void picoRTOS_disable_interrupt( picoRTOS_irq_t irq )
Enables an interrupt on the system
void picoRTOS_enable_interrupt( picoRTOS_irq_t irq )
Flushes the data cache by address(es)
void picoRTOS_flush_dcache( /*@unused@*/ void * addr, size_t n )
Initialises a futex
void picoRTOS_futex_init( picoRTOS_futex_t * futex )
Acquires a futex
void picoRTOS_futex_lock( picoRTOS_futex_t * futex )
Tries to acquire a futex
int picoRTOS_futex_trylock( picoRTOS_futex_t * futex )
Releases a futex
void picoRTOS_futex_unlock( picoRTOS_futex_t * futex )
Gets the first available priority by descending order (n -> 0)
picoRTOS_priority_t picoRTOS_get_last_available_priority( void )
Gets the first available priority by ascending order (0 -> n)
picoRTOS_priority_t picoRTOS_get_next_available_priority( void )
Returns the current system tick/timer
picoRTOS_tick_t picoRTOS_get_tick( void )
Initialises picoRTOS (mandatory)
void picoRTOS_init( void )
Invalidates the data cache by address(es)
void picoRTOS_invalidate_dcache( /*@unused@*/ void * addr, size_t n )
Kills the current task (suicide)
void picoRTOS_kill( void )
Initialises a mutex
void picoRTOS_mutex_init( struct picoRTOS_mutex * mutex )
Acquires a mutex
void picoRTOS_mutex_lock( struct picoRTOS_mutex * mutex )
Tries to acquire a mutex
int picoRTOS_mutex_trylock( struct picoRTOS_mutex * mutex )
Releases a mutex
void picoRTOS_mutex_unlock( struct picoRTOS_mutex * mutex )
Registers an interrupt/irq to the system
void picoRTOS_register_interrupt( picoRTOS_irq_t irq, picoRTOS_isr_fn fn, void * priv )
Resumes the scheduling.
void picoRTOS_resume()
Puts the current task to sleep until next tick
void picoRTOS_schedule( void )
Returns the current task’s priority/identitifer
picoRTOS_pid_t picoRTOS_self( void )
Puts the current task to sleep for the specified number of ticks
void picoRTOS_sleep( picoRTOS_tick_t delay )
Puts the current task to sleep until *ref + period is elapsed.
void picoRTOS_sleep_until( picoRTOS_tick_t * ref, picoRTOS_tick_t period )
Add a task to picoRTOS-SMP & assign it to specific core(s)
void picoRTOS_SMP_add_task( struct picoRTOS_task * task, picoRTOS_priority_t prio, picoRTOS_mask_t core_mask )
Disables an interrupt on the selected cores
void picoRTOS_SMP_disable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Enables an interrupt on the selected cores
void picoRTOS_SMP_enable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Starts the scheduling.
void picoRTOS_start( void )
Suspends the scheduling.
void picoRTOS_suspend()
Initialises a task structure
void picoRTOS_task_init( struct picoRTOS_task * task, picoRTOS_task_fn fn, void * priv, picoRTOS_stack_t * stack, size_t stack_count )
Executes a tick increment
extern /*@exposed@*/ /*@null@*/ picoRTOS_stack_t *picoRTOS_tick( picoRTOS_stack_t * sp )
Initializes a PWM block (TC)
int pwm_avr_init( struct pwm_avr * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_avr_pwm_init( struct pwm * ctx, struct pwm_avr * parent, pwm_avr_oc_t oc )
Configures a PWM output
int pwm_avr_pwm_setup( struct pwm * ctx, struct pwm_settings * settings )
Configures a PWM block
int pwm_avr_setup( struct pwm_avr * ctx, struct pwm_avr_settings * settings )
Inits an GD32VF103 TIMER as PWM
int pwm_gd32vf103_init( struct pwm_gd32vf103 * ctx, int base, clock_id_t clkid )
Creates a PWM output from an PWM / TIMER block
int pwm_gd32vf103_pwm_init( struct pwm * ctx, struct pwm_gd32vf103 * parent, size_t channel )
Configures a PWM output
int pwm_gd32vf103_pwm_setup( struct pwm * ctx, struct pwm_gd32vf103_pwm_settings * settings )
Configures an TIMER / PWM
int pwm_gd32vf103_setup( struct pwm_gd32vf103 * ctx, struct pwm_gd32vf103_settings * settings )
Inits an NXP eMIOS block
int pwm_nxp_emios_init( struct pwm_nxp_emios * ctx, int base, clock_id_t clkid )
Creates a PWM output from an eMIOS block
int pwm_nxp_emios_pwm_init( struct pwm * ctx, struct pwm_nxp_emios * parent, size_t channel )
Configures a PWM output from an eMIOS block
int pwm_nxp_emios_pwm_setup( struct pwm * ctx, struct pwm_nxp_emios_pwm_settings * settings )
Configures an eMIOS block
int pwm_nxp_emios_setup( struct pwm_nxp_emios * ctx, struct pwm_nxp_emios_settings * settings )
Initializes a PWM
int pwm_pic32mx_init( struct pwm * ctx, int oc_base, int tc_base, clock_id_t clkid )
Configures a PWM
int pwm_pic32mx_setup( struct pwm * ctx, struct pwm_pic32mx_settings * settings )
Inits an Reneas RA4 GPT PWM timer
int pwm_renesas_ra4_gpt_init( struct pwm_renesas_ra4_gpt * ctx, int base, clock_id_t clkid )
Creates a PWM output from a GPT timer
int pwm_renesas_ra4_gpt_pwm_init( struct pwm * ctx, struct pwm_renesas_ra4_gpt * parent, pwm_renesas_ra4_gpt_output_t output )
Configures a PWM output
int pwm_renesas_ra4_gpt_pwm_setup( struct pwm * ctx, struct pwm_renesas_ra4_gpt_pwm_settings * settings )
Initializes a PWM block
int pwm_rp2040_init( struct pwm_rp2040 * ctx, int base, clock_id_t clkid )
Initializes an input PWM
int pwm_rp2040_ipwm_init( struct ipwm * ctx, struct pwm_rp2040 * parent, size_t channel )
Configures an IPWM
int pwm_rp2040_ipwm_setup( struct ipwm * ctx, struct pwm_rp2040_ipwm_settings * settings )
Initializes a PWM output
int pwm_rp2040_pwm_init( struct pwm * ctx, struct pwm_rp2040 * parent, size_t channel, pwm_rp2040_pwm_output_t output )
Initializes a PWM block
int pwm_sam3x_init( struct pwm_sam * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_sam3x_pwm_init( struct pwm * ctx, struct pwm_sam * parent, size_t channel )
Configures a PWM output
int pwm_sam3x_pwm_setup( struct pwm * ctx, struct pwm_sam_pwm_settings * settings )
Configures a PWM block
int pwm_sam3x_setup( struct pwm_sam * ctx, struct pwm_sam_settings * settings )
Initializes a SAME5x TC for PWM
int pwm_same5x_tc_init( struct pwm_same5x_tc * ctx, int base, clock_id_t clkid )
Initializes a SAME5x PWM channel
int pwm_same5x_tc_pwm_init( /*@out@*/ struct pwm * ctx, struct pwm_same5x_tc * parent, size_t channel )
Configures a SAME5x PWM channel
int pwm_same5x_tc_pwm_setup( struct pwm * ctx, struct pwm_same5x_tc_pwm_settings * settings )
Configures a SAME5x TC used as PWM
int pwm_same5x_tc_setup( struct pwm_same5x_tc * ctx, struct pwm_same5x_tc_settings * settings )
Defines a PWM duty cycle
int pwm_set_duty_cycle( struct pwm * ctx, pwm_duty_cycle_t duty_cycle )
Defines a PWM period
int pwm_set_period( struct pwm * ctx, pwm_period_us_t period )
Starts the PWM
void pwm_start( struct pwm * ctx )
Initializes a STM32H7xx TIM for PWM
int pwm_stm32h7xx_tim_init( struct pwm_stm32h7xx_tim * ctx, int base, clock_id_t clkid, size_t channel_count )
Initializes a STM32H7xx PWM channel
int pwm_stm32h7xx_tim_pwm_init( struct pwm * ctx, struct pwm_stm32h7xx_tim * parent, size_t channel )
Configures a STM32H7xx PWM channel
int pwm_stm32h7xx_tim_pwm_setup( struct pwm * ctx, struct pwm_stm32h7xx_tim_pwm_settings * settings )
Configures a STM32H7xx TIM used as PWM
int pwm_stm32h7xx_tim_setup( struct pwm_stm32h7xx_tim * ctx, struct pwm_stm32h7xx_tim_settings * settings )
Stops the PWM
void pwm_stop( struct pwm * ctx )
Inits an TI_EPWM block
int pwm_ti_epwm_init( struct pwm_ti_epwm * ctx, int base, clock_id_t clkid )
Creates a PWM output from an TI_EPWM block
int pwm_ti_epwm_pwm_init( struct pwm * ctx, struct pwm_ti_epwm * parent, pwm_ti_epwm_cmp_t cmp )
Configures a PWM output from an TI_EPWM block
int pwm_ti_epwm_pwm_setup( struct pwm * ctx, struct pwm_ti_epwm_pwm_settings * settings )
Configures an TI_EPWM block
int pwm_ti_epwm_setup( struct pwm_ti_epwm * ctx, struct pwm_ti_epwm_settings * settings )
Initializes a PWM block (TCAx)
int pwm_tinyavr_tca_init( struct pwm_tinyavr_tca * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_tinyavr_tca_pwm_init( struct pwm * ctx, struct pwm_tinyavr_tca * parent, pwm_tinyavr_tca_cmp_t cmp )
Configures a PWM block
int pwm_tinyavr_tca_setup( struct pwm_tinyavr_tca * ctx, struct pwm_tinyavr_tca_settings * settings )
Locks system protected registers
void pic32mx_lock( void )
Unlocks system protected registers
void pic32mx_unlock( void )
Adds a task to picoRTOS
void picoRTOS_add_task( struct picoRTOS_task * task, picoRTOS_priority_t prio )
Broadcasts a condition to a all waiting threads
void picoRTOS_cond_broadcast( struct picoRTOS_cond * cond )
Initialises a condition
void picoRTOS_cond_init( struct picoRTOS_cond * cond )
Signals a condition to a single waiting thread
void picoRTOS_cond_signal( struct picoRTOS_cond * cond )
Waits for a condition to be signaled
void picoRTOS_cond_wait( struct picoRTOS_cond * cond, struct picoRTOS_mutex * mutex )
Disables an interrupt on the system
void picoRTOS_disable_interrupt( picoRTOS_irq_t irq )
Enables an interrupt on the system
void picoRTOS_enable_interrupt( picoRTOS_irq_t irq )
Flushes the data cache by address(es)
void picoRTOS_flush_dcache( /*@unused@*/ void * addr, size_t n )
Initialises a futex
void picoRTOS_futex_init( picoRTOS_futex_t * futex )
Acquires a futex
void picoRTOS_futex_lock( picoRTOS_futex_t * futex )
Tries to acquire a futex
int picoRTOS_futex_trylock( picoRTOS_futex_t * futex )
Releases a futex
void picoRTOS_futex_unlock( picoRTOS_futex_t * futex )
Gets the first available priority by descending order (n -> 0)
picoRTOS_priority_t picoRTOS_get_last_available_priority( void )
Gets the first available priority by ascending order (0 -> n)
picoRTOS_priority_t picoRTOS_get_next_available_priority( void )
Returns the current system tick/timer
picoRTOS_tick_t picoRTOS_get_tick( void )
Initialises picoRTOS (mandatory)
void picoRTOS_init( void )
Invalidates the data cache by address(es)
void picoRTOS_invalidate_dcache( /*@unused@*/ void * addr, size_t n )
Kills the current task (suicide)
void picoRTOS_kill( void )
Initialises a mutex
void picoRTOS_mutex_init( struct picoRTOS_mutex * mutex )
Acquires a mutex
void picoRTOS_mutex_lock( struct picoRTOS_mutex * mutex )
Tries to acquire a mutex
int picoRTOS_mutex_trylock( struct picoRTOS_mutex * mutex )
Releases a mutex
void picoRTOS_mutex_unlock( struct picoRTOS_mutex * mutex )
Registers an interrupt/irq to the system
void picoRTOS_register_interrupt( picoRTOS_irq_t irq, picoRTOS_isr_fn fn, void * priv )
Resumes the scheduling.
void picoRTOS_resume( void )
Puts the current task to sleep until next tick
void picoRTOS_schedule( void )
Returns the current task’s priority/identitifer
picoRTOS_pid_t picoRTOS_self( void )
Puts the current task to sleep for the specified number of ticks
void picoRTOS_sleep( picoRTOS_tick_t delay )
Puts the current task to sleep until *ref + period is elapsed.
void picoRTOS_sleep_until( picoRTOS_tick_t * ref, picoRTOS_tick_t period )
Add a task to picoRTOS-SMP & assign it to specific core(s)
void picoRTOS_SMP_add_task( struct picoRTOS_task * task, picoRTOS_priority_t prio, picoRTOS_mask_t core_mask )
Disables an interrupt on the selected cores
void picoRTOS_SMP_disable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Enables an interrupt on the selected cores
void picoRTOS_SMP_enable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Starts the scheduling.
void picoRTOS_start( void )
Suspends the scheduling.
void picoRTOS_suspend( void )
Initialises a task structure
void picoRTOS_task_init( struct picoRTOS_task * task, picoRTOS_task_fn fn, void * priv, picoRTOS_stack_t * stack, size_t stack_count )
Executes a tick increment
extern /*@exposed@*/ /*@null@*/ picoRTOS_stack_t *picoRTOS_tick( picoRTOS_stack_t * sp )
Initializes a PWM block (TC)
int pwm_avr_init( struct pwm_avr * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_avr_pwm_init( struct pwm * ctx, struct pwm_avr * parent, pwm_avr_oc_t oc )
Configures a PWM output
int pwm_avr_pwm_setup( struct pwm * ctx, struct pwm_settings * settings )
Configures a PWM block
int pwm_avr_setup( struct pwm_avr * ctx, struct pwm_avr_settings * settings )
Inits an GD32VF103 TIMER as PWM
int pwm_gd32vf103_init( struct pwm_gd32vf103 * ctx, int base, clock_id_t clkid )
Creates a PWM output from an PWM / TIMER block
int pwm_gd32vf103_pwm_init( struct pwm * ctx, struct pwm_gd32vf103 * parent, size_t channel )
Configures a PWM output
int pwm_gd32vf103_pwm_setup( struct pwm * ctx, struct pwm_gd32vf103_pwm_settings * settings )
Configures an TIMER / PWM
int pwm_gd32vf103_setup( struct pwm_gd32vf103 * ctx, struct pwm_gd32vf103_settings * settings )
Inits an NXP eMIOS block
int pwm_nxp_emios_init( struct pwm_nxp_emios * ctx, int base, clock_id_t clkid )
Creates a PWM output from an eMIOS block
int pwm_nxp_emios_pwm_init( struct pwm * ctx, struct pwm_nxp_emios * parent, size_t channel )
Configures a PWM output from an eMIOS block
int pwm_nxp_emios_pwm_setup( struct pwm * ctx, struct pwm_nxp_emios_pwm_settings * settings )
Configures an eMIOS block
int pwm_nxp_emios_setup( struct pwm_nxp_emios * ctx, struct pwm_nxp_emios_settings * settings )
Initializes a PWM
int pwm_pic32mx_init( struct pwm * ctx, int oc_base, int tc_base, clock_id_t clkid )
Configures a PWM
int pwm_pic32mx_setup( struct pwm * ctx, struct pwm_pic32mx_settings * settings )
Inits an Reneas RA4 GPT PWM timer
int pwm_renesas_ra4_gpt_init( struct pwm_renesas_ra4_gpt * ctx, int base, clock_id_t clkid )
Creates a PWM output from a GPT timer
int pwm_renesas_ra4_gpt_pwm_init( struct pwm * ctx, struct pwm_renesas_ra4_gpt * parent, pwm_renesas_ra4_gpt_output_t output )
Configures a PWM output
int pwm_renesas_ra4_gpt_pwm_setup( struct pwm * ctx, struct pwm_renesas_ra4_gpt_pwm_settings * settings )
Initializes a PWM block
int pwm_rp2040_init( struct pwm_rp2040 * ctx, int base, clock_id_t clkid )
Initializes an input PWM
int pwm_rp2040_ipwm_init( struct ipwm * ctx, struct pwm_rp2040 * parent, size_t channel )
Configures an IPWM
int pwm_rp2040_ipwm_setup( struct ipwm * ctx, struct pwm_rp2040_ipwm_settings * settings )
Initializes a PWM output
int pwm_rp2040_pwm_init( struct pwm * ctx, struct pwm_rp2040 * parent, size_t channel, pwm_rp2040_pwm_output_t output )
Initializes a PWM block
int pwm_sam3x_init( struct pwm_sam * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_sam3x_pwm_init( struct pwm * ctx, struct pwm_sam * parent, size_t channel )
Configures a PWM output
int pwm_sam3x_pwm_setup( struct pwm * ctx, struct pwm_sam_pwm_settings * settings )
Configures a PWM block
int pwm_sam3x_setup( struct pwm_sam * ctx, struct pwm_sam_settings * settings )
Initializes a SAME5x TC for PWM
int pwm_same5x_tc_init( struct pwm_same5x_tc * ctx, int base, clock_id_t clkid )
Initializes a SAME5x PWM channel
int pwm_same5x_tc_pwm_init( /*@out@*/ struct pwm * ctx, struct pwm_same5x_tc * parent, size_t channel )
Configures a SAME5x PWM channel
int pwm_same5x_tc_pwm_setup( struct pwm * ctx, struct pwm_same5x_tc_pwm_settings * settings )
Configures a SAME5x TC used as PWM
int pwm_same5x_tc_setup( struct pwm_same5x_tc * ctx, struct pwm_same5x_tc_settings * settings )
Defines a PWM duty cycle
int pwm_set_duty_cycle( struct pwm * ctx, pwm_duty_cycle_t duty_cycle )
Defines a PWM period
int pwm_set_period( struct pwm * ctx, pwm_period_us_t period )
Starts the PWM
void pwm_start( struct pwm * ctx )
Initializes a STM32H7xx TIM for PWM
int pwm_stm32h7xx_tim_init( struct pwm_stm32h7xx_tim * ctx, int base, clock_id_t clkid, size_t channel_count )
Initializes a STM32H7xx PWM channel
int pwm_stm32h7xx_tim_pwm_init( struct pwm * ctx, struct pwm_stm32h7xx_tim * parent, size_t channel )
Configures a STM32H7xx PWM channel
int pwm_stm32h7xx_tim_pwm_setup( struct pwm * ctx, struct pwm_stm32h7xx_tim_pwm_settings * settings )
Configures a STM32H7xx TIM used as PWM
int pwm_stm32h7xx_tim_setup( struct pwm_stm32h7xx_tim * ctx, struct pwm_stm32h7xx_tim_settings * settings )
Stops the PWM
void pwm_stop( struct pwm * ctx )
Inits an TI_EPWM block
int pwm_ti_epwm_init( struct pwm_ti_epwm * ctx, int base, clock_id_t clkid )
Creates a PWM output from an TI_EPWM block
int pwm_ti_epwm_pwm_init( struct pwm * ctx, struct pwm_ti_epwm * parent, pwm_ti_epwm_cmp_t cmp )
Configures a PWM output from an TI_EPWM block
int pwm_ti_epwm_pwm_setup( struct pwm * ctx, struct pwm_ti_epwm_pwm_settings * settings )
Configures an TI_EPWM block
int pwm_ti_epwm_setup( struct pwm_ti_epwm * ctx, struct pwm_ti_epwm_settings * settings )
Initializes a PWM block (TCAx)
int pwm_tinyavr_tca_init( struct pwm_tinyavr_tca * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_tinyavr_tca_pwm_init( struct pwm * ctx, struct pwm_tinyavr_tca * parent, pwm_tinyavr_tca_cmp_t cmp )
Configures a PWM block
int pwm_tinyavr_tca_setup( struct pwm_tinyavr_tca * ctx, struct pwm_tinyavr_tca_settings * settings )
Initializes a SPI
int spi_arm_pl022_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a ARM PL022 SPI
int spi_arm_pl022_setup( struct spi * ctx, struct spi_arm_pl022_settings * settings )
Initializes a SERCOM SPI
int spi_atmel_sercom_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a SERCOM SPI
int spi_atmel_sercom_setup( struct spi * ctx, struct spi_atmel_sercom_settings * settings )
Initializes a SPI
int spi_avr_init( struct spi * ctx, int base, spi_avr_speed_t speed )
Inits an USART in SPI master mode
int spi_avr_usart_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_gd32vf103_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a NXP SPI/DSPI interface
int spi_nxp_dspi_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_pic32mx_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_renesas_ra4_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_sam3x_init( struct spi * ctx, int base, clock_id_t clkid )
Sets SPI to loopback mode for tests
int spi_sam3x_set_loopback( struct spi * ctx, bool loopback )
Configure a SPI interface
int spi_setup( struct spi * ctx, const struct spi_settings * settings )
Initializes a SPI
int spi_stm32h7xx_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a spi port
int spi_stm32h7xx_setup( struct spi * ctx, struct spi_stm32h7xx_settings * settings )
Inits a SPI
int spi_ti_f28x_init( struct spi * ctx, int base, clock_id_t clkid )
Configures SPI specifics (DMA, loopback)
int spi_ti_f28x_setup( struct spi * ctx, struct spi_ti_f28x_settings * settings )
Initializes a SPI
int spi_tinyavr_init( struct spi * ctx, int base, clock_id_t clkid )
Transfers data over a SPI interface
int spi_xfer( struct spi * ctx, void * rx, const void * tx, size_t n )
Initializes a SPI
int spi_arm_pl022_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a ARM PL022 SPI
int spi_arm_pl022_setup( struct spi * ctx, struct spi_arm_pl022_settings * settings )
Initializes a SERCOM SPI
int spi_atmel_sercom_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a SERCOM SPI
int spi_atmel_sercom_setup( struct spi * ctx, struct spi_atmel_sercom_settings * settings )
Initializes a SPI
int spi_avr_init( struct spi * ctx, int base, spi_avr_speed_t speed )
Inits an USART in SPI master mode
int spi_avr_usart_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_gd32vf103_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a NXP SPI/DSPI interface
int spi_nxp_dspi_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_pic32mx_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_renesas_ra4_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_sam3x_init( struct spi * ctx, int base, clock_id_t clkid )
Sets SPI to loopback mode for tests
int spi_sam3x_set_loopback( struct spi * ctx, bool loopback )
Configure a SPI interface
int spi_setup( struct spi * ctx, const struct spi_settings * settings )
Initializes a SPI
int spi_stm32h7xx_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a spi port
int spi_stm32h7xx_setup( struct spi * ctx, struct spi_stm32h7xx_settings * settings )
Inits a SPI
int spi_ti_f28x_init( struct spi * ctx, int base, clock_id_t clkid )
Configures SPI specifics (DMA, loopback)
int spi_ti_f28x_setup( struct spi * ctx, struct spi_ti_f28x_settings * settings )
Initializes a SPI
int spi_tinyavr_init( struct spi * ctx, int base, clock_id_t clkid )
Transfers data over a SPI interface
int spi_xfer( struct spi * ctx, void * rx, const void * tx, size_t n )
Initializes a SERCOM I2C
int twi_atmel_sercom_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI
int twi_avr_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI/I2C
int twi_dw_apb_i2c_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI/I2C peripheral
int twi_pic32mx_init( struct twi * ctx, int base, clock_id_t clkid )
Polls TWI interface for transfer (slave mode)
int twi_poll( struct twi * ctx )
Read data from a TWI interface
int twi_read( struct twi * ctx, void * buf, size_t n )
Initializes a TWI / I2C
int twi_sam3x_init( struct twi * ctx, int base, clock_id_t clkid )
Configures a TWI interface
int twi_setup( struct twi * ctx, struct twi_settings * settings )
Init an I2C interface
int twi_ti_f28x_init( struct twi * ctx, int base, clock_id_t clkid )
Write data to a TWI interface
int twi_write( struct twi * ctx, const void * buf, size_t n )
Initializes a SERCOM I2C
int twi_atmel_sercom_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI
int twi_avr_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI/I2C
int twi_dw_apb_i2c_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI/I2C peripheral
int twi_pic32mx_init( struct twi * ctx, int base, clock_id_t clkid )
Polls TWI interface for transfer (slave mode)
int twi_poll( struct twi * ctx )
Read data from a TWI interface
int twi_read( struct twi * ctx, void * buf, size_t n )
Initializes a TWI / I2C
int twi_sam3x_init( struct twi * ctx, int base, clock_id_t clkid )
Configures a TWI interface
int twi_setup( struct twi * ctx, struct twi_settings * settings )
Init an I2C interface
int twi_ti_f28x_init( struct twi * ctx, int base, clock_id_t clkid )
Write data to a TWI interface
int twi_write( struct twi * ctx, const void * buf, size_t n )
Initializes an UART
int uart_arm_pl011_init( struct uart * ctx, int base, clock_id_t clkid )
Sets UART for loopback mode (test)
int uart_arm_pl011_set_loopback( struct uart * ctx, bool loopback )
Initializes a SERCOM UART
int uart_atmel_sercom_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_avr_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_gd32vf103_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART on a LINFLexD interface
int uart_nxp_linflexd_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_pic32mx_init( struct uart * ctx, int base, clock_id_t clkid )
Read data from a UART interface
int uart_read( struct uart * ctx, char * buf, size_t n )
Initializes an UART
int uart_renesas_ra4_sci_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_sam3x_init( struct uart * ctx, int base, clock_id_t clkid )
Configure a UART interface
int uart_setup( struct uart * ctx, const struct uart_settings * settings )
Initializes an UART/USART
int uart_stm32h7xx_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an USART as UART
int uart_tinyavr_usart_init( struct uart * ctx, int base, clock_id_t clkid )
Write data to a UART interface
int uart_write( struct uart * ctx, const char * buf, size_t n )
Initializes an UART
int uart_arm_pl011_init( struct uart * ctx, int base, clock_id_t clkid )
Sets UART for loopback mode (test)
int uart_arm_pl011_set_loopback( struct uart * ctx, bool loopback )
Initializes a SERCOM UART
int uart_atmel_sercom_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_avr_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_gd32vf103_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART on a LINFLexD interface
int uart_nxp_linflexd_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_pic32mx_init( struct uart * ctx, int base, clock_id_t clkid )
Read data from a UART interface
int uart_read( struct uart * ctx, char * buf, size_t n )
Initializes an UART
int uart_renesas_ra4_sci_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_sam3x_init( struct uart * ctx, int base, clock_id_t clkid )
Configure a UART interface
int uart_setup( struct uart * ctx, const struct uart_settings * settings )
Initializes an UART/USART
int uart_stm32h7xx_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an USART as UART
int uart_tinyavr_usart_init( struct uart * ctx, int base, clock_id_t clkid )
Write data to a UART interface
int uart_write( struct uart * ctx, const char * buf, size_t n )
Initializes the watchdog timer
int wd_avr_init( struct wd * ctx, int base )
Configures a watchdog timer
int wd_avr_setup( struct wd * ctx, struct wd_avr_settings * settings )
Initializes a free watchdog timer
int wd_gd32vf103_fwdgt_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a watchdog
int wd_gd32vf103_fwdgt_setup( struct wd * ctx, struct wd_gd32vf103_fwdgt_settings * settings )
Initializes a watchdog
int wd_pic32mx_init( struct wd * ctx, int base )
Configures the watchdog
int wd_pic32mx_setup( struct wd * ctx, struct wd_pic32mx_settings * settings )
Refreshes the watchdog
void wd_refresh( struct wd * ctx )
Initializes a watchdog timer
int wd_rp2040_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a WD
int wd_rp2040_setup( struct wd * ctx, struct wd_rp2040_settings * settings )
Initializes a watchdog timer
int wd_sam3x_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a WD
int wd_sam3x_setup( struct wd * ctx, struct wd_sam3x_settings * settings )
Initializes a watchdog timer
int wd_same5x_init( struct wd * ctx, int base )
Configures a watchdog
int wd_same5x_setup( struct wd * ctx, struct wd_same5x_settings * settings )
Starts the watchdog
int wd_start( struct wd * ctx )
Initializes a free-running watchdog timer
int wd_stm32h7xx_iwdg_init( /*@out@*/ struct wd * ctx, int base, clock_id_t clkid )
Configures a IWDG watchdog
int wd_stm32h7xx_iwdg_setup( struct wd * ctx, struct wd_stm32h7xx_iwdg_settings * settings )
Stops the watchdog
int wd_stop( struct wd * ctx )
Init a watchdog
int wd_ti_f28x_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a watchdog
int wd_ti_f28x_setup( struct wd * ctx, struct wd_ti_f28x_settings * settings )
Initializes the watchdog timer
int wd_tinyavr_init( struct wd * ctx, int base )
Configures a watchdog timer
int wd_tinyavr_setup( struct wd * ctx, struct wd_tinyavr_settings * settings )
Initializes the watchdog timer
int wd_avr_init( struct wd * ctx, int base )
Configures a watchdog timer
int wd_avr_setup( struct wd * ctx, struct wd_avr_settings * settings )
Initializes a free watchdog timer
int wd_gd32vf103_fwdgt_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a watchdog
int wd_gd32vf103_fwdgt_setup( struct wd * ctx, struct wd_gd32vf103_fwdgt_settings * settings )
Initializes a watchdog
int wd_pic32mx_init( struct wd * ctx, int base )
Configures the watchdog
int wd_pic32mx_setup( struct wd * ctx, struct wd_pic32mx_settings * settings )
Refreshes the watchdog
void wd_refresh( struct wd * ctx )
Initializes a watchdog timer
int wd_rp2040_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a WD
int wd_rp2040_setup( struct wd * ctx, struct wd_rp2040_settings * settings )
Initializes a watchdog timer
int wd_sam3x_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a WD
int wd_sam3x_setup( struct wd * ctx, struct wd_sam3x_settings * settings )
Initializes a watchdog timer
int wd_same5x_init( struct wd * ctx, int base )
Configures a watchdog
int wd_same5x_setup( struct wd * ctx, struct wd_same5x_settings * settings )
Starts the watchdog
int wd_start( struct wd * ctx )
Initializes a free-running watchdog timer
int wd_stm32h7xx_iwdg_init( /*@out@*/ struct wd * ctx, int base, clock_id_t clkid )
Configures a IWDG watchdog
int wd_stm32h7xx_iwdg_setup( struct wd * ctx, struct wd_stm32h7xx_iwdg_settings * settings )
Stops the watchdog
int wd_stop( struct wd * ctx )
Init a watchdog
int wd_ti_f28x_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a watchdog
int wd_ti_f28x_setup( struct wd * ctx, struct wd_ti_f28x_settings * settings )
Initializes the watchdog timer
int wd_tinyavr_init( struct wd * ctx, int base )
Configures a watchdog timer
int wd_tinyavr_setup( struct wd * ctx, struct wd_tinyavr_settings * settings )
Initializes an ADC channel
int adc_avr_adc_init( struct adc * ctx, struct adc_avr * parent, size_t channel )
Initializes an ADC block
int adc_avr_init( struct adc_avr * ctx, int base )
Configures an ADC block
int adc_avr_setup( struct adc_avr * ctx, struct adc_avr_settings * settings )
Inits an ADC channel
int adc_nxp_sar_adc_init( struct adc * ctx, struct adc_nxp_sar * parent, size_t channel )
Inits a NXP ADC SAR block
int adc_nxp_sar_init( struct adc_nxp_sar * ctx, int base )
Configures a NXP ADC SAR block
int adc_nxp_sar_setup( struct adc_nxp_sar * ctx, struct adc_nxp_sar_settings * settings )
Inits an ADC channel
int adc_pic32mx_adc_init( struct adc * ctx, struct adc_pic32mx * parent, size_t channel )
Configures an ADC channel
int adc_pic32mx_adc_setup( struct adc * ctx, struct adc_pic32mx_adc_settings * settings )
Init an ADC block
int adc_pic32mx_init( struct adc_pic32mx * ctx, int base )
Configures an ADC block
int adc_pic32mx_setup( struct adc_pic32mx * ctx, struct adc_pic32mx_settings * settings )
Reads a value from the adc
int adc_read( struct adc * ctx, int * data )
Reads multiple values from the adc (oversampling)
int adc_read_multiple( struct adc * ctx, int * data, size_t n )
Initializes an ADC channel
int adc_renesas_ra4_adc_init( struct adc * ctx, struct adc_renesas_ra4 * parent, size_t channel )
Initializes an ADC block
int adc_renesas_ra4_init( struct adc_renesas_ra4 * ctx, int base )
Configures an ADC block
int adc_renesas_ra4_setup( struct adc_renesas_ra4 * ctx, struct adc_renesas_ra4_settings * settings )
Initializes an ADC channel
int adc_rp2040_adc_init( struct adc * ctx, struct adc_rp2040 * parent, size_t channel )
Initializes an ADC block
int adc_rp2040_init( struct adc_rp2040 * ctx, int base )
Initializes an ADC channel
int adc_sam3x_adc_init( struct adc * ctx, struct adc_sam3x * parent, size_t channel )
Initializes an ADC block
int adc_sam3x_init( struct adc_sam3x * ctx, int base )
Initializes an ADC channel
int adc_same5x_init( struct adc * ctx, int base, adc_same5x_channel_t channel )
Configures an ADC
int adc_setup( struct adc * ctx, struct adc_settings * settings )
Inits an ADC channel
int adc_ti_type4_adc_init( struct adc * ctx, struct adc_ti_type4 * parent, size_t channel, size_t sample_count, adc_ti_type4_intflg_t intflg )
Configures an ADC channel
int adc_ti_type4_adc_setup( struct adc * ctx, struct adc_ti_type4_adc_settings * settings )
Inits an ADC block
int adc_ti_type4_init( struct adc_ti_type4 * ctx, int base, int result_base, unsigned long cal_inl_addr )
Configures an ADC block
int adc_ti_type4_setup( struct adc_ti_type4 * ctx, struct adc_ti_type4_settings * settings )
Initializes an ADC channel
int adc_tinyavr_adc_init( struct adc * ctx, struct adc_tinyavr * parent, adc_tinyavr_muxpos_t muxpos )
Initializes an ADC block
int adc_tinyavr_init( struct adc_tinyavr * ctx, int base, clock_id_t clkid )
Configures an ADC block
int adc_tinyavr_setup( struct adc_tinyavr * ctx, struct adc_tinyavr_settings * settings )
Acknowledge the system tick interrupt as an auxiliary core
extern void arch_acknowledge_tick( void )
Atomic compare and swap operation, will swap the value of *var to new if it’s equal to old
extern /*@unused@*/ picoRTOS_atomic_t arch_compare_and_swap( picoRTOS_atomic_t * var, picoRTOS_atomic_t old, picoRTOS_atomic_t val )
Provides the current running core identifier/index
extern picoRTOS_core_t arch_core( void )
Auxiliary core startup function
extern void arch_core_init( picoRTOS_core_t core, picoRTOS_stack_t * stack, size_t stack_count, picoRTOS_stack_t * sp )
Provides the current cpu counter value
extern picoRTOS_cycles_t arch_counter( arch_counter_t counter, picoRTOS_cycles_t t )
Busy waits for at least n microseconds
extern /*@external@*/ void arch_delay_us( unsigned long n )
Disables an irq
extern /*@unused@*/ void arch_disable_interrupt( picoRTOS_irq_t irq )
Enables an irq
extern /*@unused@*/ void arch_enable_interrupt( picoRTOS_irq_t irq )
Flushes one or more cache lines
extern /*@external@*/ void arch_flush_dcache( void * addr, size_t n )
The default idle function/task
extern /*@noreturn@*/ void arch_idle( /*@null@*/ void * null )
Architecture port initialization function
extern void arch_init( void )
Invalidates one or more cache lines
extern /*@external@*/ void arch_invalidate_dcache( void * addr, size_t n )
Propagates the system tick interrupt to auxiliary cores
extern void arch_propagate_tick( void )
Resumes the scheduling
extern void arch_resume( void )
Sets the currect CPU input frequency
extern /*@external@*/ void arch_set_clock_frequency( unsigned long freq )
Disables an interrupt on a specific core or set of cores
extern /*@unused@*/ void arch_smp_disable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Enables an interrupt on a specific core or set of cores
extern /*@unused@*/ void arch_smp_enable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
SMP Architecture port initialization function
extern void arch_smp_init( void )
Locks the SMP spinlock
extern void arch_spin_lock( void )
Unlocks the SMP spinlock
extern void arch_spin_unlock( void )
Starts the first task on the system (idle) and bootstraps the scheduler
extern /*@noreturn@*/ void arch_start_first_task( picoRTOS_stack_t * sp )
Suspends the scheduling
extern void arch_suspend( void )
Syscall port function
extern void arch_syscall( picoRTOS_syscall_t syscall, /*@null@*/ void * priv )
Atomic test and set operation
extern /*@unused@*/ picoRTOS_atomic_t arch_test_and_set( picoRTOS_atomic_t * ptr )
Initializes an ADC channel
int adc_avr_adc_init( struct adc * ctx, struct adc_avr * parent, size_t channel )
Initializes an ADC block
int adc_avr_init( struct adc_avr * ctx, int base )
Configures an ADC block
int adc_avr_setup( struct adc_avr * ctx, struct adc_avr_settings * settings )
Inits an ADC channel
int adc_nxp_sar_adc_init( struct adc * ctx, struct adc_nxp_sar * parent, size_t channel )
Inits a NXP ADC SAR block
int adc_nxp_sar_init( struct adc_nxp_sar * ctx, int base )
Configures a NXP ADC SAR block
int adc_nxp_sar_setup( struct adc_nxp_sar * ctx, struct adc_nxp_sar_settings * settings )
Inits an ADC channel
int adc_pic32mx_adc_init( struct adc * ctx, struct adc_pic32mx * parent, size_t channel )
Configures an ADC channel
int adc_pic32mx_adc_setup( struct adc * ctx, struct adc_pic32mx_adc_settings * settings )
Init an ADC block
int adc_pic32mx_init( struct adc_pic32mx * ctx, int base )
Configures an ADC block
int adc_pic32mx_setup( struct adc_pic32mx * ctx, struct adc_pic32mx_settings * settings )
Reads a value from the adc
int adc_read( struct adc * ctx, int * data )
Reads multiple values from the adc (oversampling)
int adc_read_multiple( struct adc * ctx, int * data, size_t n )
Initializes an ADC channel
int adc_renesas_ra4_adc_init( struct adc * ctx, struct adc_renesas_ra4 * parent, size_t channel )
Initializes an ADC block
int adc_renesas_ra4_init( struct adc_renesas_ra4 * ctx, int base )
Configures an ADC block
int adc_renesas_ra4_setup( struct adc_renesas_ra4 * ctx, struct adc_renesas_ra4_settings * settings )
Initializes an ADC channel
int adc_rp2040_adc_init( struct adc * ctx, struct adc_rp2040 * parent, size_t channel )
Initializes an ADC block
int adc_rp2040_init( struct adc_rp2040 * ctx, int base )
Initializes an ADC channel
int adc_sam3x_adc_init( struct adc * ctx, struct adc_sam3x * parent, size_t channel )
Initializes an ADC block
int adc_sam3x_init( struct adc_sam3x * ctx, int base )
Initializes an ADC channel
int adc_same5x_init( struct adc * ctx, int base, adc_same5x_channel_t channel )
Configures an ADC
int adc_setup( struct adc * ctx, struct adc_settings * settings )
Inits an ADC channel
int adc_ti_type4_adc_init( struct adc * ctx, struct adc_ti_type4 * parent, size_t channel, size_t sample_count, adc_ti_type4_intflg_t intflg )
Configures an ADC channel
int adc_ti_type4_adc_setup( struct adc * ctx, struct adc_ti_type4_adc_settings * settings )
Inits an ADC block
int adc_ti_type4_init( struct adc_ti_type4 * ctx, int base, int result_base, unsigned long cal_inl_addr )
Configures an ADC block
int adc_ti_type4_setup( struct adc_ti_type4 * ctx, struct adc_ti_type4_settings * settings )
Initializes an ADC channel
int adc_tinyavr_adc_init( struct adc * ctx, struct adc_tinyavr * parent, adc_tinyavr_muxpos_t muxpos )
Initializes an ADC block
int adc_tinyavr_init( struct adc_tinyavr * ctx, int base, clock_id_t clkid )
Configures an ADC block
int adc_tinyavr_setup( struct adc_tinyavr * ctx, struct adc_tinyavr_settings * settings )
Acknowledge the system tick interrupt as an auxiliary core
extern void arch_acknowledge_tick( void )
Atomic compare and swap operation, will swap the value of *var to new if it’s equal to old
extern /*@unused@*/ picoRTOS_atomic_t arch_compare_and_swap( picoRTOS_atomic_t * var, picoRTOS_atomic_t old, picoRTOS_atomic_t val )
Provides the current running core identifier/index
extern picoRTOS_core_t arch_core( void )
Auxiliary core startup function
extern void arch_core_init( picoRTOS_core_t core, picoRTOS_stack_t * stack, size_t stack_count, picoRTOS_stack_t * sp )
Provides the current cpu counter value
extern picoRTOS_cycles_t arch_counter( arch_counter_t counter, picoRTOS_cycles_t t )
Busy waits for at least n microseconds
extern /*@external@*/ void arch_delay_us( unsigned long n )
Disables an irq
extern /*@unused@*/ void arch_disable_interrupt( picoRTOS_irq_t irq )
Enables an irq
extern /*@unused@*/ void arch_enable_interrupt( picoRTOS_irq_t irq )
Flushes one or more cache lines
extern /*@external@*/ void arch_flush_dcache( void * addr, size_t n )
The default idle function/task
extern /*@noreturn@*/ void arch_idle( /*@null@*/ void * null )
Architecture port initialization function
extern void arch_init( void )
Invalidates one or more cache lines
extern /*@external@*/ void arch_invalidate_dcache( void * addr, size_t n )
Propagates the system tick interrupt to auxiliary cores
extern void arch_propagate_tick( void )
Resumes the scheduling
extern void arch_resume( void )
Sets the currect CPU input frequency
extern /*@external@*/ void arch_set_clock_frequency( unsigned long freq )
Disables an interrupt on a specific core or set of cores
extern /*@unused@*/ void arch_smp_disable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Enables an interrupt on a specific core or set of cores
extern /*@unused@*/ void arch_smp_enable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
SMP Architecture port initialization function
extern void arch_smp_init( void )
Locks the SMP spinlock
extern void arch_spin_lock( void )
Unlocks the SMP spinlock
extern void arch_spin_unlock( void )
Starts the first task on the system (idle) and bootstraps the scheduler
extern /*@noreturn@*/ void arch_start_first_task( picoRTOS_stack_t * sp )
Suspends the scheduling
extern void arch_suspend( void )
Syscall port function
extern void arch_syscall( syscall_t syscall, /*@null@*/ void * priv )
Atomic test and set operation
extern /*@unused@*/ picoRTOS_atomic_t arch_test_and_set( picoRTOS_atomic_t * ptr )
Registers a message for rx on a CAN interface
int can_accept( struct can * ctx, can_id_t id, can_id_t accept_mask )
Init a FlexCAN interface
int can_nxp_flexcan_init( struct can * ctx, int base, clock_id_t clkid, size_t mailbox_count )
Configures a FlexCAN interface
int can_nxp_flexcan_setup( struct can * ctx, struct can_nxp_flexcan_settings * settings )
Receives a message from the CAN interface
int can_read( struct can * ctx, can_id_t * id, void * buf, size_t n )
Send a RTR frame with the specified ID
int can_request_frame( struct can * ctx, can_id_t id )
Init a CAN interface
int can_sam3x_init( struct can * ctx, int base, clock_id_t clkid )
Configures a CAN interface
int can_setup( struct can * ctx, struct can_settings * settings )
Init a CAN interface
int can_ti_dcan_init( struct can * ctx, long base, clock_id_t clkid )
Sends a message on the CAN interface
int can_write( struct can * ctx, can_id_t id, const void * buf, size_t n )
Initialises the f28379x clock system
int clock_f28379x_init( struct clock_settings * settings )
Disables a peripheral clock
int clock_f28379x_pclk_disable( clock_f28379x_pclk_t pclk )
Enables a peripheral clock
int clock_f28379x_pclk_enable( clock_f28379x_pclk_t pclk )
Disables a particular clock
int clock_gd32vf103_disable( clock_gd32vf103_clk_t clk )
Enables a particular clock
int clock_gd32vf103_enable( clock_gd32vf103_clk_t clk )
Initialises the GD32VF103 clock system
int clock_gd32vf103_init( struct clock_settings * settings )
Gets a clock frequency (in hz)
clock_freq_t clock_get_freq( clock_id_t clkid )
Inits the MPC574xx clock subsystem
int clock_mpc574xx_init( struct clock_settings * settings )
Configures the LP_PC register (Low Power)
int clock_mpc574xx_set_lp_pc( size_t index, int flags )
Configured the Low Power clock mode of a peripheral
int clock_mpc574xx_set_pctl_lp_cfg( clock_mpc574xx_pctl_t pctl, size_t lp_pc )
Configured the RUN clock mode of a peripheral
int clock_mpc574xx_set_pctl_run_cfg( clock_mpc574xx_pctl_t pctl, size_t run_pc )
Configures the RUN_PC register
int clock_mpc574xx_set_run_pc( size_t index, int flags )
Inits the SIU clock subsystem
int clock_nxp_siu_init( struct clock_settings * settings )
Initializes the PIC32MX clock system
int clock_pic32mx_init( struct clock_settings * settings )
Disable a particular PB clock
int clock_pic32mx_pbclk_disable( clock_id_t clkid )
Enables a particular PB clock
int clock_pic32mx_pbclk_enable( clock_id_t clkid, unsigned long pbdiv )
Intializes the Renesas RA4 clock system
int clock_renesas_ra4_init( struct clock_settings * settings )
Sends power/clock to the selected module
int clock_renesas_ra4_module_start( size_t module )
Stops power/clock to the selected module
int clock_renesas_ra4_module_stop( size_t module )
Disables a particular clock
int clock_rp2040_disable( clock_id_t clkid )
Enables a particular clock
int clock_rp2040_enable( clock_id_t clkid )
Intializes the rp2040 clock system
int clock_rp2040_init( struct clock_settings * settings )
Disable a particular clock
int clock_sam3x_pmc_disable( clock_id_t clkid )
Enables a particular clock
int clock_sam3x_pmc_enable( clock_id_t clkid, clock_sam3x_pmc_periph_div_t periph_div )
Initialises the SAM3X clock system
int clock_sam3x_pmc_init( struct clock_settings * settings )
Disables the SAME5x DFLL clock
int clock_same5x_dfll_disable( void )
Enables the SAME5x DFLL clock
int clock_same5x_dfll_enable( void )
Configures the SAME5x DFLL clock
int clock_same5x_dfll_setup( struct clock_same5x_dfll_settings * settings )
Disables a SAME5x clock
int clock_same5x_disable( clock_id_t clkid )
Disables a SAME5x DPLL
int clock_same5x_dpll_disable( size_t index )
Enables a SAME5x DPLL
int clock_same5x_dpll_enable( size_t index )
Configures a SAME5x DPLL
int clock_same5x_dpll_setup( size_t index, struct clock_same5x_dpll_settings * settings )
Enables a SAME5x clock
int clock_same5x_enable( clock_id_t clkid )
Disables a SAME5x GCLK generator
int clock_same5x_gclk_generator_disable( size_t index )
Enables a SAME5x GCLK generator
int clock_same5x_gclk_generator_enable( size_t index )
Configures a SAME5x GCLK generator
int clock_same5x_gclk_generator_setup( size_t index, struct clock_same5x_gclk_settings * settings )
Resets the SAME5x clock system
int clock_same5x_gclk_reset( void )
Disables a SAME5x MCLK gate
int clock_same5x_mclk_disable( clock_same5x_mclk_t mclk )
Enables a SAME5x MCLK gate
int clock_same5x_mclk_enable( clock_same5x_mclk_t mclk )
Configures a SAME5x clock / attach a clock id to a gclk generator
int clock_same5x_setup( clock_id_t clkid, size_t gclk_index )
Disables a specific clock
int clock_stm32h7xx_disable( clock_stm32h7xx_axb_t clk )
Enables a specific clock
int clock_stm32h7xx_enable( clock_stm32h7xx_axb_t clk )
Initialises the RCC clock system
int clock_stm32h7xx_init( struct clock_settings * settings )
Selects the kernel clock for a specific peripheral
int clock_stm32h7xx_ker_sel( clock_stm32h7xx_ker_t ker, unsigned int value )
Intializes the tinyAVR 1-series clock system
int clock_tinyavr_init( struct clock_settings * settings )
Registers a message for rx on a CAN interface
int can_accept( struct can * ctx, can_id_t id, can_id_t accept_mask )
Init a FlexCAN interface
int can_nxp_flexcan_init( struct can * ctx, int base, clock_id_t clkid, size_t mailbox_count )
Configures a FlexCAN interface
int can_nxp_flexcan_setup( struct can * ctx, struct can_nxp_flexcan_settings * settings )
Receives a message from the CAN interface
int can_read( struct can * ctx, can_id_t * id, void * buf, size_t n )
Send a RTR frame with the specified ID
int can_request_frame( struct can * ctx, can_id_t id )
Init a CAN interface
int can_sam3x_init( struct can * ctx, int base, clock_id_t clkid )
Configures a CAN interface
int can_setup( struct can * ctx, struct can_settings * settings )
Init a CAN interface
int can_ti_dcan_init( struct can * ctx, long base, clock_id_t clkid )
Sends a message on the CAN interface
int can_write( struct can * ctx, can_id_t id, const void * buf, size_t n )
Intializes the cy7c6801xa clock system
int clock_cy7c6801xa_init( struct clock_settings * settings )
Initialises the f28379x clock system
int clock_f28379x_init( struct clock_settings * settings )
Disables a peripheral clock
int clock_f28379x_pclk_disable( clock_f28379x_pclk_t pclk )
Enables a peripheral clock
int clock_f28379x_pclk_enable( clock_f28379x_pclk_t pclk )
Disables a particular clock
int clock_gd32vf103_disable( clock_gd32vf103_clk_t clk )
Enables a particular clock
int clock_gd32vf103_enable( clock_gd32vf103_clk_t clk )
Initialises the GD32VF103 clock system
int clock_gd32vf103_init( struct clock_settings * settings )
Gets a clock frequency (in hz)
clock_freq_t clock_get_freq( clock_id_t clkid )
Inits the MPC574xx clock subsystem
int clock_mpc574xx_init( struct clock_settings * settings )
Configures the LP_PC register (Low Power)
int clock_mpc574xx_set_lp_pc( size_t index, int flags )
Configured the Low Power clock mode of a peripheral
int clock_mpc574xx_set_pctl_lp_cfg( clock_mpc574xx_pctl_t pctl, size_t lp_pc )
Configured the RUN clock mode of a peripheral
int clock_mpc574xx_set_pctl_run_cfg( clock_mpc574xx_pctl_t pctl, size_t run_pc )
Configures the RUN_PC register
int clock_mpc574xx_set_run_pc( size_t index, int flags )
Intializes the n76e003 clock system
int clock_n76e003_init( struct clock_settings * settings )
Inits the SIU clock subsystem
int clock_nxp_siu_init( struct clock_settings * settings )
Initializes the PIC32MX clock system
int clock_pic32mx_init( struct clock_settings * settings )
Disable a particular PB clock
int clock_pic32mx_pbclk_disable( clock_id_t clkid )
Enables a particular PB clock
int clock_pic32mx_pbclk_enable( clock_id_t clkid, unsigned long pbdiv )
Intializes the Renesas RA4 clock system
int clock_renesas_ra4_init( struct clock_settings * settings )
Sends power/clock to the selected module
int clock_renesas_ra4_module_start( size_t module )
Stops power/clock to the selected module
int clock_renesas_ra4_module_stop( size_t module )
Disables a particular clock
int clock_rp2040_disable( clock_id_t clkid )
Enables a particular clock
int clock_rp2040_enable( clock_id_t clkid )
Intializes the rp2040 clock system
int clock_rp2040_init( struct clock_settings * settings )
Disable a particular clock
int clock_sam3x_pmc_disable( clock_id_t clkid )
Enables a particular clock
int clock_sam3x_pmc_enable( clock_id_t clkid, clock_sam3x_pmc_periph_div_t periph_div )
Initialises the SAM3X clock system
int clock_sam3x_pmc_init( struct clock_settings * settings )
Disables the SAME5x DFLL clock
int clock_same5x_dfll_disable( void )
Enables the SAME5x DFLL clock
int clock_same5x_dfll_enable( void )
Configures the SAME5x DFLL clock
int clock_same5x_dfll_setup( struct clock_same5x_dfll_settings * settings )
Disables a SAME5x clock
int clock_same5x_disable( clock_id_t clkid )
Disables a SAME5x DPLL
int clock_same5x_dpll_disable( size_t index )
Enables a SAME5x DPLL
int clock_same5x_dpll_enable( size_t index )
Configures a SAME5x DPLL
int clock_same5x_dpll_setup( size_t index, struct clock_same5x_dpll_settings * settings )
Enables a SAME5x clock
int clock_same5x_enable( clock_id_t clkid )
Disables a SAME5x GCLK generator
int clock_same5x_gclk_generator_disable( size_t index )
Enables a SAME5x GCLK generator
int clock_same5x_gclk_generator_enable( size_t index )
Configures a SAME5x GCLK generator
int clock_same5x_gclk_generator_setup( size_t index, struct clock_same5x_gclk_settings * settings )
Resets the SAME5x clock system
int clock_same5x_gclk_reset( void )
Disables a SAME5x MCLK gate
int clock_same5x_mclk_disable( clock_same5x_mclk_t mclk )
Enables a SAME5x MCLK gate
int clock_same5x_mclk_enable( clock_same5x_mclk_t mclk )
Configures a SAME5x clock / attach a clock id to a gclk generator
int clock_same5x_setup( clock_id_t clkid, size_t gclk_index )
Disables a specific clock
int clock_stm32h7xx_disable( clock_stm32h7xx_axb_t clk )
Enables a specific clock
int clock_stm32h7xx_enable( clock_stm32h7xx_axb_t clk )
Initialises the RCC clock system
int clock_stm32h7xx_init( struct clock_settings * settings )
Selects the kernel clock for a specific peripheral
int clock_stm32h7xx_ker_sel( clock_stm32h7xx_ker_t ker, unsigned int value )
Intializes the tinyAVR 1-series clock system
int clock_tinyavr_init( struct clock_settings * settings )
Initialises a GD32VF103 DMA channel
int dma_gd32vf103_init( struct dma * ctx, int base, size_t channel )
Initialiases a NXP eDMA controller channel
int dma_nxp_edma_dma_init( struct dma * ctx, struct dma_nxp_edma * parent, size_t channel )
Initialiases a NXP eDMA controller block
int dma_nxp_edma_init( struct dma_nxp_edma * ctx, int base )
Initializes a DMA channel
int dma_r2040_init( struct dma * ctx, int base, size_t channel, dma_rp2040_treq_sel_t treq_sel )
Initialiases a SAME5x DMAC controller channel
int dma_same5x_dma_init( /*@out@*/ struct dma * ctx, struct dma_same5x * parent, size_t channel, dma_same5x_trigsrc_t trigsrc )
Initialiases a SAME5x DMAC controller
int dma_same5x_init( struct dma_same5x * ctx, int base )
Configures a DMA for external trigger
int dma_setup( struct dma * ctx, struct dma_xfer * xfer )
Initialises a STM32H7xx DMA channel
int dma_stm32h7xx_init( struct dma * ctx, int base, size_t channel )
Inits a DMA channel
int dma_ti_f28x_init( struct dma * ctx, int base, size_t channel, dma_ti_f28x_chsrcsel_t chsrcsel )
Starts a DMA transfer
int dma_xfer( struct dma * ctx, struct dma_xfer * xfer )
Polls a DMA for end of transfer
int dma_xfer_done( struct dma * ctx )
Inits the DMAMUX channel
int dmamux_stm32h7xx_init( struct dmamux * ctx, int base, size_t channel )
Configures and DMAXMUX DMAREQ_ID
int dmamux_stm32h7xx_set_dmareq_id( struct dmamux * ctx, unsigned long id )
Starts a DMA scatter-gather transfer
int dmasg_xfer( struct dmasg * ctx, struct dmasg_xfer * xfer )
Initialises a GD32VF103 DMA channel
int dma_gd32vf103_init( struct dma * ctx, int base, size_t channel )
Initialiases a NXP eDMA controller channel
int dma_nxp_edma_dma_init( struct dma * ctx, struct dma_nxp_edma * parent, size_t channel )
Initialiases a NXP eDMA controller block
int dma_nxp_edma_init( struct dma_nxp_edma * ctx, int base )
Initializes a DMA channel
int dma_r2040_init( struct dma * ctx, int base, size_t channel, dma_rp2040_treq_sel_t treq_sel )
Initialiases a SAME5x DMAC controller channel
int dma_same5x_dma_init( /*@out@*/ struct dma * ctx, struct dma_same5x * parent, size_t channel, dma_same5x_trigsrc_t trigsrc )
Initialiases a SAME5x DMAC controller
int dma_same5x_init( struct dma_same5x * ctx, int base )
Configures a DMA for external trigger
int dma_setup( struct dma * ctx, struct dma_xfer * xfer )
Initialises a STM32H7xx DMA channel
int dma_stm32h7xx_init( struct dma * ctx, int base, size_t channel )
Inits a DMA channel
int dma_ti_f28x_init( struct dma * ctx, int base, size_t channel, dma_ti_f28x_chsrcsel_t chsrcsel )
Starts a DMA transfer
int dma_xfer( struct dma * ctx, struct dma_xfer * xfer )
Polls a DMA for end of transfer
int dma_xfer_done( struct dma * ctx )
Inits the DMAMUX channel
int dmamux_stm32h7xx_init( struct dmamux * ctx, int base, size_t channel )
Configures and DMAXMUX DMAREQ_ID
int dmamux_stm32h7xx_set_dmareq_id( struct dmamux * ctx, unsigned long id )
Starts a DMA scatter-gather transfer
int dmasg_xfer( struct dmasg * ctx, struct dmasg_xfer * xfer )
Initializes an EEPROM block
int eeprom_avr_init( struct eeprom * ctx, int base, int SPMCSR_base )
Erase data from EEPROM
int eeprom_erase( struct eeprom * ctx, size_t addr, size_t n )
Reads value from EEPROM
int eeprom_read( struct eeprom * ctx, size_t addr, void * buf, size_t n )
Write values to EEPROM
int eeprom_write( struct eeprom * ctx, size_t addr, const void * buf, size_t n )
Initializes an EEPROM block
int eeprom_avr_init( struct eeprom * ctx, int base, int SPMCSR_base )
Erase data from EEPROM
int eeprom_erase( struct eeprom * ctx, size_t addr, size_t n )
Reads value from EEPROM
int eeprom_read( struct eeprom * ctx, size_t addr, void * buf, size_t n )
Write values to EEPROM
int eeprom_write( struct eeprom * ctx, size_t addr, const void * buf, size_t n )
Checks if a flash block is blank/empty
int flash_blankcheck( struct flash * ctx, size_t block )
Erases a sector from flash
int flash_erase( struct flash * ctx, size_t block )
Initializes a GD32VF103 FMC
int flash_gd32vf103_init( struct flash * ctx, int base, size_t block_count )
Gets the memory address of the specified block
int flash_get_block_addr( struct flash * ctx, size_t block )
Gets the minimal erase size for the specified block
int flash_get_erase_size( struct flash * ctx, size_t block )
Gets the number of blocks present in the flash
int flash_get_nblocks( struct flash * ctx )
Gets the minimal write size for the specified block
int flash_get_write_size( struct flash * ctx, size_t block )
Protects a block in flash
int flash_lock( struct flash * ctx, size_t block )
Initializes a pic32mx flash controller (RTSP)
int flash_pic32mx_init( struct flash * ctx, int base, size_t block_count )
Initializes a NVMCTRL flash controller
int flash_same5x_init( struct flash * ctx, int base )
Unprotects a flash block
int flash_unlock( struct flash * ctx, size_t block )
Writes data to flash
int flash_write( struct flash * ctx, size_t addr, const void * data, size_t n )
Checks if a flash block is blank/empty
int flash_blankcheck( struct flash * ctx, size_t block )
Erases a sector from flash
int flash_erase( struct flash * ctx, size_t block )
Initializes a GD32VF103 FMC
int flash_gd32vf103_init( struct flash * ctx, int base, size_t block_count )
Gets the memory address of the specified block
int flash_get_block_addr( struct flash * ctx, size_t block )
Gets the minimal erase size for the specified block
int flash_get_erase_size( struct flash * ctx, size_t block )
Gets the number of blocks present in the flash
int flash_get_nblocks( struct flash * ctx )
Gets the minimal write size for the specified block
int flash_get_write_size( struct flash * ctx, size_t block )
Protects a block in flash
int flash_lock( struct flash * ctx, size_t block )
Initializes a pic32mx flash controller (RTSP)
int flash_pic32mx_init( struct flash * ctx, int base, size_t block_count )
Initializes a NVMCTRL flash controller
int flash_same5x_init( struct flash * ctx, int base )
Unprotects a flash block
int flash_unlock( struct flash * ctx, size_t block )
Writes data to flash
int flash_write( struct flash * ctx, size_t addr, const void * data, size_t n )
Initializes a GPIO
int gpio_avr_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_gd32vf103_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_nxp_siu_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_nxp_siul2_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_pic32mx_init( struct gpio * ctx, int base, size_t pin )
Read value from a gpio
bool gpio_read( struct gpio * ctx )
Initializes a GPIO
int gpio_renesas_ra4_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_rp2040_sio_init( struct gpio * ctx, int base, size_t pin, gpio_rp2040_sio_dir_t dir )
Initializes a GPIO
int gpio_sam3x_pio_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_same5x_init( struct gpio * ctx, int base, size_t pin )
Configures a gpio
int gpio_setup( struct gpio * ctx, struct gpio_settings * settings )
Initializes a GPIO
int gpio_stm32h7xx_init( struct gpio * ctx, int base, size_t pin )
Initialises a GPIO
int gpio_ti_f28x_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_tinyavr_init( struct gpio * ctx, int base, size_t pin )
Toggles a gpio value
void gpio_toggle( struct gpio * ctx )
Sets a gpio to a value
void gpio_write( struct gpio * ctx, bool value )
Initializes a GPIO
int gpio_avr_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_gd32vf103_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_nxp_siu_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_nxp_siul2_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_pic32mx_init( struct gpio * ctx, int base, size_t pin )
Read value from a gpio
bool gpio_read( struct gpio * ctx )
Initializes a GPIO
int gpio_renesas_ra4_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_rp2040_sio_init( struct gpio * ctx, int base, size_t pin, gpio_rp2040_sio_dir_t dir )
Initializes a GPIO
int gpio_sam3x_pio_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_same5x_init( struct gpio * ctx, int base, size_t pin )
Configures a gpio
int gpio_setup( struct gpio * ctx, struct gpio_settings * settings )
Initializes a GPIO
int gpio_stm32h7xx_init( struct gpio * ctx, int base, size_t pin )
Initialises a GPIO
int gpio_ti_f28x_init( struct gpio * ctx, int base, size_t pin )
Initializes a GPIO
int gpio_tinyavr_init( struct gpio * ctx, int base, size_t pin )
Toggles a gpio value
void gpio_toggle( struct gpio * ctx )
Sets a gpio to a value
void gpio_write( struct gpio * ctx, bool value )
Measures the duty cycle of a PWM
int ipwm_get_duty_cycle( struct ipwm * ctx, pwm_duty_cycle_t * duty_cycle )
Measures the period of a train of pulses
int ipwm_get_period( struct ipwm * ctx, pwm_period_us_t * period )
Measures the duty cycle of a PWM
int ipwm_get_duty_cycle( struct ipwm * ctx, pwm_duty_cycle_t * duty_cycle )
Measures the period of a train of pulses
int ipwm_get_period( struct ipwm * ctx, pwm_period_us_t * period )
Reads data from a LIN interface
int lin_read( struct lin * ctx, uint8_t * id, void * buf, size_t n )
Configures a LIN interface
int lin_setup( struct lin * ctx, struct lin_settings * settings )
Writes data to the LIN interface
int lin_write( struct lin * ctx, uint8_t id, const void * buf, size_t n )
Reads data from a LIN interface
int lin_read( struct lin * ctx, uint8_t * id, void * buf, size_t n )
Configures a LIN interface
int lin_setup( struct lin * ctx, struct lin_settings * settings )
Writes data to the LIN interface
int lin_write( struct lin * ctx, uint8_t id, const void * buf, size_t n )
Initializes multiplexing on a port
int mux_avr_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_avr_input( struct mux * ctx, size_t pin )
Sets the selected pin to output
int mux_avr_output( struct mux * ctx, size_t pin, bool value )
Sets a pin as atlernate / AFIO
int mux_gd32vf103_afio( struct mux * ctx, size_t pin, mux_gd32vf103_afio_t mode, mux_gd32vf103_speed_t speed )
Remaps an AFIO (see doc)
int mux_gd32vf103_afio_remap( mux_gd32vf103_afio_remap_t remap, uint32_t value )
Sets a pin as analog input
int mux_gd32vf103_analog( struct mux * ctx, size_t pin )
Initializes a gpio port for muxing
int mux_gd32vf103_init( struct mux * ctx, int base )
Sets a pin as input
int mux_gd32vf103_input( struct mux * ctx, size_t pin, mux_gd32vf103_input_t mode )
Sets a pin as output
int mux_gd32vf103_output( struct mux * ctx, size_t pin, mux_gd32vf103_output_t mode, mux_gd32vf103_speed_t speed )
Sets the IMUX MUXSEL value (see IO Signal Description for more details)
int mux_nxp_siu_imux_muxsel( struct mux * ctx, size_t reg, size_t muxsel, size_t value )
Initializes multiplexing on a port
int mux_nxp_siu_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_nxp_siu_input( struct mux * ctx, size_t pin, mux_nxp_siu_t mux )
Sets the selected pin to output
int mux_nxp_siu_output( struct mux * ctx, size_t pin, mux_nxp_siu_t mux )
Pulls the selected pin down
int mux_nxp_siu_pull_down( struct mux * ctx, size_t pin )
Pulls the selected pin up
int mux_nxp_siu_pull_up( struct mux * ctx, size_t pin )
Sets the selected pin to analog input
int mux_nxp_siul2_analog( struct mux * ctx, size_t pin )
Initializes multiplexing on a port
int mux_nxp_siul2_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_nxp_siul2_input( struct mux * ctx, size_t pin, mux_nxp_siul2_t mux, size_t imcr )
Sets the selected pin to output
int mux_nxp_siul2_output( struct mux * ctx, size_t pin, mux_nxp_siul2_t mux )
Pulls the selected pin down
int mux_nxp_siul2_pull_down( struct mux * ctx, size_t pin )
Pulls the selected pin up
int mux_nxp_siul2_pull_up( struct mux * ctx, size_t pin )
Configures a pin for analog input
int mux_pic32mx_analog( struct mux_pic32mx * ctx, size_t pin )
Initialises a mux PORT
int mux_pic32mx_init( struct mux_pic32mx * ctx, int base )
Configures a pin for digital input
int mux_pic32mx_input( struct mux_pic32mx * ctx, size_t pin )
Configures a pin for digital output
int mux_pic32mx_output( struct mux_pic32mx * ctx, size_t pin )
Configures a PPS input
int mux_pic32mx_peripheral_pin_select_input( mux_pic32mx_ppsi_t ppsi, size_t opt )
Configures a PPS output
int mux_pic32mx_peripheral_pin_select_output( mux_pic32mx_ppso_t ppso, size_t opt )
Adds a pull down to the selected pin
int mux_pic32mx_pull_down( struct mux_pic32mx * ctx, size_t pin )
Adds a pull up to the selected pin
int mux_pic32mx_pull_up( struct mux_pic32mx * ctx, size_t pin )
Set port pin as analog input
int mux_renesas_ra4_analog( struct mux * ctx, size_t pin )
Initializes multiplexing on a port
int mux_renesas_ra4_init( struct mux * ctx, int base, size_t port )
Set port pin as GPIO input
int mux_renesas_ra4_input( struct mux * ctx, size_t pin )
Set port pin as GPIO output
int mux_renesas_ra4_output( struct mux * ctx, size_t pin )
Set port pin as special peripheral
int mux_renesas_ra4_periph( struct mux * ctx, size_t pin, size_t psel )
Pulls up input pin
int mux_renesas_ra4_pull_up( struct mux * ctx, size_t pin )
Initializes a port for muxing
int mux_rp2040_init( struct mux * ctx, int io_base, int pads_base )
Sets a pin as input only
int mux_rp2040_input( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Sets a pin as input AND output
int mux_rp2040_io( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Sets a pin as output only
int mux_rp2040_output( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Overrides a specific pin value
int mux_rp2040_override( struct mux * ctx, size_t pin, mux_rp2040_over_t over )
Pulls down a specific mux pin
int mux_rp2040_pull_down( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_rp2040_pull_up( struct mux * ctx, size_t pin )
Sets the drive strength of a pin
int mux_rp2040_set_drive( struct mux * ctx, size_t pin, mux_rp2040_drive_t drive )
Initializes a mux port
int mux_sam3x_pio_init( struct mux_sam3x_pio * ctx, int base )
Sets a pin to input only
int mux_sam3x_pio_input( struct mux_sam3x_pio * ctx, size_t pin, mux_sam3x_pio_t mux )
Sets a pin to output only
int mux_sam3x_pio_output( struct mux_sam3x_pio * ctx, size_t pin, mux_sam3x_pio_t mux )
Pulls up a specific pin
int mux_sam3x_pio_pull_up( struct mux_sam3x_pio * ctx, size_t pin )
Initializes a mux port
int mux_same5x_init( struct mux_same5x * ctx, int base )
Sets a pin to input only
int mux_same5x_input( struct mux_same5x * ctx, size_t pin, mux_pmux_t pmux )
Sets a pin to output only
int mux_same5x_output( struct mux_same5x * ctx, size_t pin, mux_pmux_t pmux )
Pulls a specific pin down
int mux_same5x_pull_down( struct mux_same5x * ctx, size_t pin )
Pulls a specific pin up
int mux_same5x_pull_up( struct mux_same5x * ctx, size_t pin )
Sets a pin as alternate function pin
int mux_stm32h7xx_alt( struct mux * ctx, size_t pin, size_t alt )
Sets a pin as analog input
int mux_stm32h7xx_analog( struct mux * ctx, size_t pin )
Initializes a port for muxing
int mux_stm32h7xx_init( struct mux * ctx, int base )
Sets a pin as discrete input
int mux_stm32h7xx_input( struct mux * ctx, size_t pin )
Sets a pin as discrete output
int mux_stm32h7xx_output( struct mux * ctx, size_t pin )
Pulls down a specific mux pin
int mux_stm32h7xx_pull_down( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_stm32h7xx_pull_up( struct mux * ctx, size_t pin )
Initialises a multiplexer block
int mux_ti_f28x_init( struct mux * ctx, int base )
Configures a pin as input
int mux_ti_f28x_input( struct mux * ctx, size_t pin, mux_ti_f28x_t gmux, mux_ti_f28x_t mux )
Configures a pin as output
int mux_ti_f28x_output( struct mux * ctx, size_t pin, mux_ti_f28x_t gmux, mux_ti_f28x_t mux )
Pulls up a specific pin
int mux_ti_f28x_pull_up( struct mux * ctx, size_t pin )
Configures the QSEL value of a pin
int mux_ti_f28x_set_qsel( struct mux * ctx, size_t pin, mux_ti_f28x_qsel_t qsel )
Initializes a port for muxing
int mux_tinyavr_init( struct mux * ctx, int base )
Sets a pin as input only
int mux_tinyavr_input( struct mux * ctx, size_t pin )
Sets a pin as output only
int mux_tinyavr_output( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_tinyavr_pull_up( struct mux * ctx, size_t pin )
Initializes multiplexing on a port
int mux_avr_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_avr_input( struct mux * ctx, size_t pin )
Sets the selected pin to output
int mux_avr_output( struct mux * ctx, size_t pin, bool value )
Sets a pin as atlernate / AFIO
int mux_gd32vf103_afio( struct mux * ctx, size_t pin, mux_gd32vf103_afio_t mode, mux_gd32vf103_speed_t speed )
Remaps an AFIO (see doc)
int mux_gd32vf103_afio_remap( mux_gd32vf103_afio_remap_t remap, uint32_t value )
Sets a pin as analog input
int mux_gd32vf103_analog( struct mux * ctx, size_t pin )
Initializes a gpio port for muxing
int mux_gd32vf103_init( struct mux * ctx, int base )
Sets a pin as input
int mux_gd32vf103_input( struct mux * ctx, size_t pin, mux_gd32vf103_input_t mode )
Sets a pin as output
int mux_gd32vf103_output( struct mux * ctx, size_t pin, mux_gd32vf103_output_t mode, mux_gd32vf103_speed_t speed )
Sets the IMUX MUXSEL value (see IO Signal Description for more details)
int mux_nxp_siu_imux_muxsel( struct mux * ctx, size_t reg, size_t muxsel, size_t value )
Initializes multiplexing on a port
int mux_nxp_siu_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_nxp_siu_input( struct mux * ctx, size_t pin, mux_nxp_siu_t mux )
Sets the selected pin to output
int mux_nxp_siu_output( struct mux * ctx, size_t pin, mux_nxp_siu_t mux )
Pulls the selected pin down
int mux_nxp_siu_pull_down( struct mux * ctx, size_t pin )
Pulls the selected pin up
int mux_nxp_siu_pull_up( struct mux * ctx, size_t pin )
Sets the selected pin to analog input
int mux_nxp_siul2_analog( struct mux * ctx, size_t pin )
Initializes multiplexing on a port
int mux_nxp_siul2_init( struct mux * ctx, int base )
Sets the selected pin to input
int mux_nxp_siul2_input( struct mux * ctx, size_t pin, mux_nxp_siul2_t mux, size_t imcr )
Sets the selected pin to output
int mux_nxp_siul2_output( struct mux * ctx, size_t pin, mux_nxp_siul2_t mux )
Pulls the selected pin down
int mux_nxp_siul2_pull_down( struct mux * ctx, size_t pin )
Pulls the selected pin up
int mux_nxp_siul2_pull_up( struct mux * ctx, size_t pin )
Configures a pin for analog input
int mux_pic32mx_analog( struct mux_pic32mx * ctx, size_t pin )
Initialises a mux PORT
int mux_pic32mx_init( struct mux_pic32mx * ctx, int base )
Configures a pin for digital input
int mux_pic32mx_input( struct mux_pic32mx * ctx, size_t pin )
Configures a pin for digital output
int mux_pic32mx_output( struct mux_pic32mx * ctx, size_t pin )
Configures a PPS input
int mux_pic32mx_peripheral_pin_select_input( mux_pic32mx_ppsi_t ppsi, size_t opt )
Configures a PPS output
int mux_pic32mx_peripheral_pin_select_output( mux_pic32mx_ppso_t ppso, size_t opt )
Adds a pull down to the selected pin
int mux_pic32mx_pull_down( struct mux_pic32mx * ctx, size_t pin )
Adds a pull up to the selected pin
int mux_pic32mx_pull_up( struct mux_pic32mx * ctx, size_t pin )
Set port pin as analog input
int mux_renesas_ra4_analog( struct mux * ctx, size_t pin )
Initializes multiplexing on a port
int mux_renesas_ra4_init( struct mux * ctx, int base, size_t port )
Set port pin as GPIO input
int mux_renesas_ra4_input( struct mux * ctx, size_t pin )
Set port pin as GPIO output
int mux_renesas_ra4_output( struct mux * ctx, size_t pin )
Set port pin as special peripheral
int mux_renesas_ra4_periph( struct mux * ctx, size_t pin, size_t psel )
Pulls up input pin
int mux_renesas_ra4_pull_up( struct mux * ctx, size_t pin )
Initializes a port for muxing
int mux_rp2040_init( struct mux * ctx, int io_base, int pads_base )
Sets a pin as input only
int mux_rp2040_input( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Sets a pin as input AND output
int mux_rp2040_io( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Sets a pin as output only
int mux_rp2040_output( struct mux * ctx, size_t pin, mux_rp2040_t funcsel )
Overrides a specific pin value
int mux_rp2040_override( struct mux * ctx, size_t pin, mux_rp2040_over_t over )
Pulls down a specific mux pin
int mux_rp2040_pull_down( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_rp2040_pull_up( struct mux * ctx, size_t pin )
Sets the drive strength of a pin
int mux_rp2040_set_drive( struct mux * ctx, size_t pin, mux_rp2040_drive_t drive )
Initializes a mux port
int mux_sam3x_pio_init( struct mux_sam3x_pio * ctx, int base )
Sets a pin to input only
int mux_sam3x_pio_input( struct mux_sam3x_pio * ctx, size_t pin, mux_sam3x_pio_t mux )
Sets a pin to output only
int mux_sam3x_pio_output( struct mux_sam3x_pio * ctx, size_t pin, mux_sam3x_pio_t mux )
Pulls up a specific pin
int mux_sam3x_pio_pull_up( struct mux_sam3x_pio * ctx, size_t pin )
Initializes a mux port
int mux_same5x_init( struct mux_same5x * ctx, int base )
Sets a pin to input only
int mux_same5x_input( struct mux_same5x * ctx, size_t pin, mux_pmux_t pmux )
Sets a pin to output only
int mux_same5x_output( struct mux_same5x * ctx, size_t pin, mux_pmux_t pmux )
Pulls a specific pin down
int mux_same5x_pull_down( struct mux_same5x * ctx, size_t pin )
Pulls a specific pin up
int mux_same5x_pull_up( struct mux_same5x * ctx, size_t pin )
Sets a pin as alternate function pin
int mux_stm32h7xx_alt( struct mux * ctx, size_t pin, size_t alt )
Sets a pin as analog input
int mux_stm32h7xx_analog( struct mux * ctx, size_t pin )
Initializes a port for muxing
int mux_stm32h7xx_init( struct mux * ctx, int base )
Sets a pin as discrete input
int mux_stm32h7xx_input( struct mux * ctx, size_t pin )
Sets a pin as discrete output
int mux_stm32h7xx_output( struct mux * ctx, size_t pin )
Pulls down a specific mux pin
int mux_stm32h7xx_pull_down( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_stm32h7xx_pull_up( struct mux * ctx, size_t pin )
Initialises a multiplexer block
int mux_ti_f28x_init( struct mux * ctx, int base )
Configures a pin as input
int mux_ti_f28x_input( struct mux * ctx, size_t pin, mux_ti_f28x_t gmux, mux_ti_f28x_t mux )
Configures a pin as output
int mux_ti_f28x_output( struct mux * ctx, size_t pin, mux_ti_f28x_t gmux, mux_ti_f28x_t mux )
Pulls up a specific pin
int mux_ti_f28x_pull_up( struct mux * ctx, size_t pin )
Configures the QSEL value of a pin
int mux_ti_f28x_set_qsel( struct mux * ctx, size_t pin, mux_ti_f28x_qsel_t qsel )
Initializes a port for muxing
int mux_tinyavr_init( struct mux * ctx, int base )
Sets a pin as input only
int mux_tinyavr_input( struct mux * ctx, size_t pin )
Sets a pin as output only
int mux_tinyavr_output( struct mux * ctx, size_t pin )
Pulls up a specific mux pin
int mux_tinyavr_pull_up( struct mux * ctx, size_t pin )
Locks system protected registers
void pic32mx_lock( void )
Unlocks system protected registers
void pic32mx_unlock( void )
Adds a task to picoRTOS
void picoRTOS_add_task( struct picoRTOS_task * task, picoRTOS_priority_t prio )
Broadcasts a condition to a all waiting threads
void picoRTOS_cond_broadcast( struct picoRTOS_cond * cond )
Initialises a condition
void picoRTOS_cond_init( struct picoRTOS_cond * cond )
Signals a condition to a single waiting thread
void picoRTOS_cond_signal( struct picoRTOS_cond * cond )
Waits for a condition to be signaled
void picoRTOS_cond_wait( struct picoRTOS_cond * cond, struct picoRTOS_mutex * mutex )
Disables an interrupt on the system
void picoRTOS_disable_interrupt( picoRTOS_irq_t irq )
Enables an interrupt on the system
void picoRTOS_enable_interrupt( picoRTOS_irq_t irq )
Flushes the data cache by address(es)
void picoRTOS_flush_dcache( /*@unused@*/ void * addr, size_t n )
Initialises a futex
void picoRTOS_futex_init( picoRTOS_futex_t * futex )
Acquires a futex
void picoRTOS_futex_lock( picoRTOS_futex_t * futex )
Tries to acquire a futex
int picoRTOS_futex_trylock( picoRTOS_futex_t * futex )
Releases a futex
void picoRTOS_futex_unlock( picoRTOS_futex_t * futex )
Gets the first available priority by descending order (n -> 0)
picoRTOS_priority_t picoRTOS_get_last_available_priority( void )
Gets the first available priority by ascending order (0 -> n)
picoRTOS_priority_t picoRTOS_get_next_available_priority( void )
Returns the current system tick/timer
picoRTOS_tick_t picoRTOS_get_tick( void )
Initialises picoRTOS (mandatory)
void picoRTOS_init( void )
Invalidates the data cache by address(es)
void picoRTOS_invalidate_dcache( /*@unused@*/ void * addr, size_t n )
Kills the current task (suicide)
void picoRTOS_kill( void )
Initialises a mutex
void picoRTOS_mutex_init( struct picoRTOS_mutex * mutex )
Acquires a mutex
void picoRTOS_mutex_lock( struct picoRTOS_mutex * mutex )
Tries to acquire a mutex
int picoRTOS_mutex_trylock( struct picoRTOS_mutex * mutex )
Releases a mutex
void picoRTOS_mutex_unlock( struct picoRTOS_mutex * mutex )
Registers an interrupt/irq to the system
void picoRTOS_register_interrupt( picoRTOS_irq_t irq, picoRTOS_isr_fn fn, void * priv )
Resumes the scheduling.
void picoRTOS_resume()
Puts the current task to sleep until next tick
void picoRTOS_schedule( void )
Returns the current task’s priority/identitifer
picoRTOS_pid_t picoRTOS_self( void )
Puts the current task to sleep for the specified number of ticks
void picoRTOS_sleep( picoRTOS_tick_t delay )
Puts the current task to sleep until *ref + period is elapsed.
void picoRTOS_sleep_until( picoRTOS_tick_t * ref, picoRTOS_tick_t period )
Add a task to picoRTOS-SMP & assign it to specific core(s)
void picoRTOS_SMP_add_task( struct picoRTOS_task * task, picoRTOS_priority_t prio, picoRTOS_mask_t core_mask )
Disables an interrupt on the selected cores
void picoRTOS_SMP_disable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Enables an interrupt on the selected cores
void picoRTOS_SMP_enable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Starts the scheduling.
void picoRTOS_start( void )
Suspends the scheduling.
void picoRTOS_suspend()
Initialises a task structure
void picoRTOS_task_init( struct picoRTOS_task * task, picoRTOS_task_fn fn, void * priv, picoRTOS_stack_t * stack, size_t stack_count )
Executes a tick increment
extern /*@exposed@*/ /*@null@*/ picoRTOS_stack_t *picoRTOS_tick( picoRTOS_stack_t * sp )
Initializes a PWM block (TC)
int pwm_avr_init( struct pwm_avr * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_avr_pwm_init( struct pwm * ctx, struct pwm_avr * parent, pwm_avr_oc_t oc )
Configures a PWM output
int pwm_avr_pwm_setup( struct pwm * ctx, struct pwm_settings * settings )
Configures a PWM block
int pwm_avr_setup( struct pwm_avr * ctx, struct pwm_avr_settings * settings )
Inits an GD32VF103 TIMER as PWM
int pwm_gd32vf103_init( struct pwm_gd32vf103 * ctx, int base, clock_id_t clkid )
Creates a PWM output from an PWM / TIMER block
int pwm_gd32vf103_pwm_init( struct pwm * ctx, struct pwm_gd32vf103 * parent, size_t channel )
Configures a PWM output
int pwm_gd32vf103_pwm_setup( struct pwm * ctx, struct pwm_gd32vf103_pwm_settings * settings )
Configures an TIMER / PWM
int pwm_gd32vf103_setup( struct pwm_gd32vf103 * ctx, struct pwm_gd32vf103_settings * settings )
Inits an NXP eMIOS block
int pwm_nxp_emios_init( struct pwm_nxp_emios * ctx, int base, clock_id_t clkid )
Creates a PWM output from an eMIOS block
int pwm_nxp_emios_pwm_init( struct pwm * ctx, struct pwm_nxp_emios * parent, size_t channel )
Configures a PWM output from an eMIOS block
int pwm_nxp_emios_pwm_setup( struct pwm * ctx, struct pwm_nxp_emios_pwm_settings * settings )
Configures an eMIOS block
int pwm_nxp_emios_setup( struct pwm_nxp_emios * ctx, struct pwm_nxp_emios_settings * settings )
Initializes a PWM
int pwm_pic32mx_init( struct pwm * ctx, int oc_base, int tc_base, clock_id_t clkid )
Configures a PWM
int pwm_pic32mx_setup( struct pwm * ctx, struct pwm_pic32mx_settings * settings )
Inits an Reneas RA4 GPT PWM timer
int pwm_renesas_ra4_gpt_init( struct pwm_renesas_ra4_gpt * ctx, int base, clock_id_t clkid )
Creates a PWM output from a GPT timer
int pwm_renesas_ra4_gpt_pwm_init( struct pwm * ctx, struct pwm_renesas_ra4_gpt * parent, pwm_renesas_ra4_gpt_output_t output )
Configures a PWM output
int pwm_renesas_ra4_gpt_pwm_setup( struct pwm * ctx, struct pwm_renesas_ra4_gpt_pwm_settings * settings )
Initializes a PWM block
int pwm_rp2040_init( struct pwm_rp2040 * ctx, int base, clock_id_t clkid )
Initializes an input PWM
int pwm_rp2040_ipwm_init( struct ipwm * ctx, struct pwm_rp2040 * parent, size_t channel )
Configures an IPWM
int pwm_rp2040_ipwm_setup( struct ipwm * ctx, struct pwm_rp2040_ipwm_settings * settings )
Initializes a PWM output
int pwm_rp2040_pwm_init( struct pwm * ctx, struct pwm_rp2040 * parent, size_t channel, pwm_rp2040_pwm_output_t output )
Initializes a PWM block
int pwm_sam3x_init( struct pwm_sam * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_sam3x_pwm_init( struct pwm * ctx, struct pwm_sam * parent, size_t channel )
Configures a PWM output
int pwm_sam3x_pwm_setup( struct pwm * ctx, struct pwm_sam_pwm_settings * settings )
Configures a PWM block
int pwm_sam3x_setup( struct pwm_sam * ctx, struct pwm_sam_settings * settings )
Initializes a SAME5x TC for PWM
int pwm_same5x_tc_init( struct pwm_same5x_tc * ctx, int base, clock_id_t clkid )
Initializes a SAME5x PWM channel
int pwm_same5x_tc_pwm_init( /*@out@*/ struct pwm * ctx, struct pwm_same5x_tc * parent, size_t channel )
Configures a SAME5x PWM channel
int pwm_same5x_tc_pwm_setup( struct pwm * ctx, struct pwm_same5x_tc_pwm_settings * settings )
Configures a SAME5x TC used as PWM
int pwm_same5x_tc_setup( struct pwm_same5x_tc * ctx, struct pwm_same5x_tc_settings * settings )
Defines a PWM duty cycle
int pwm_set_duty_cycle( struct pwm * ctx, pwm_duty_cycle_t duty_cycle )
Defines a PWM period
int pwm_set_period( struct pwm * ctx, pwm_period_us_t period )
Starts the PWM
void pwm_start( struct pwm * ctx )
Initializes a STM32H7xx TIM for PWM
int pwm_stm32h7xx_tim_init( struct pwm_stm32h7xx_tim * ctx, int base, clock_id_t clkid, size_t channel_count )
Initializes a STM32H7xx PWM channel
int pwm_stm32h7xx_tim_pwm_init( struct pwm * ctx, struct pwm_stm32h7xx_tim * parent, size_t channel )
Configures a STM32H7xx PWM channel
int pwm_stm32h7xx_tim_pwm_setup( struct pwm * ctx, struct pwm_stm32h7xx_tim_pwm_settings * settings )
Configures a STM32H7xx TIM used as PWM
int pwm_stm32h7xx_tim_setup( struct pwm_stm32h7xx_tim * ctx, struct pwm_stm32h7xx_tim_settings * settings )
Stops the PWM
void pwm_stop( struct pwm * ctx )
Inits an TI_EPWM block
int pwm_ti_epwm_init( struct pwm_ti_epwm * ctx, int base, clock_id_t clkid )
Creates a PWM output from an TI_EPWM block
int pwm_ti_epwm_pwm_init( struct pwm * ctx, struct pwm_ti_epwm * parent, pwm_ti_epwm_cmp_t cmp )
Configures a PWM output from an TI_EPWM block
int pwm_ti_epwm_pwm_setup( struct pwm * ctx, struct pwm_ti_epwm_pwm_settings * settings )
Configures an TI_EPWM block
int pwm_ti_epwm_setup( struct pwm_ti_epwm * ctx, struct pwm_ti_epwm_settings * settings )
Initializes a PWM block (TCAx)
int pwm_tinyavr_tca_init( struct pwm_tinyavr_tca * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_tinyavr_tca_pwm_init( struct pwm * ctx, struct pwm_tinyavr_tca * parent, pwm_tinyavr_tca_cmp_t cmp )
Configures a PWM block
int pwm_tinyavr_tca_setup( struct pwm_tinyavr_tca * ctx, struct pwm_tinyavr_tca_settings * settings )
Locks system protected registers
void pic32mx_lock( void )
Unlocks system protected registers
void pic32mx_unlock( void )
Adds a task to picoRTOS
void picoRTOS_add_task( struct picoRTOS_task * task, picoRTOS_priority_t prio )
Broadcasts a condition to a all waiting threads
void picoRTOS_cond_broadcast( struct picoRTOS_cond * cond )
Initialises a condition
void picoRTOS_cond_init( struct picoRTOS_cond * cond )
Signals a condition to a single waiting thread
void picoRTOS_cond_signal( struct picoRTOS_cond * cond )
Waits for a condition to be signaled
void picoRTOS_cond_wait( struct picoRTOS_cond * cond, struct picoRTOS_mutex * mutex )
Disables an interrupt on the system
void picoRTOS_disable_interrupt( picoRTOS_irq_t irq )
Enables an interrupt on the system
void picoRTOS_enable_interrupt( picoRTOS_irq_t irq )
Flushes the data cache by address(es)
void picoRTOS_flush_dcache( /*@unused@*/ void * addr, size_t n )
Initialises a futex
void picoRTOS_futex_init( picoRTOS_futex_t * futex )
Acquires a futex
void picoRTOS_futex_lock( picoRTOS_futex_t * futex )
Tries to acquire a futex
int picoRTOS_futex_trylock( picoRTOS_futex_t * futex )
Releases a futex
void picoRTOS_futex_unlock( picoRTOS_futex_t * futex )
Gets the first available priority by descending order (n -> 0)
picoRTOS_priority_t picoRTOS_get_last_available_priority( void )
Gets the first available priority by ascending order (0 -> n)
picoRTOS_priority_t picoRTOS_get_next_available_priority( void )
Returns the current system tick/timer
picoRTOS_tick_t picoRTOS_get_tick( void )
Initialises picoRTOS (mandatory)
void picoRTOS_init( void )
Invalidates the data cache by address(es)
void picoRTOS_invalidate_dcache( /*@unused@*/ void * addr, size_t n )
Kills the current task (suicide)
void picoRTOS_kill( void )
Initialises a mutex
void picoRTOS_mutex_init( struct picoRTOS_mutex * mutex )
Acquires a mutex
void picoRTOS_mutex_lock( struct picoRTOS_mutex * mutex )
Tries to acquire a mutex
int picoRTOS_mutex_trylock( struct picoRTOS_mutex * mutex )
Releases a mutex
void picoRTOS_mutex_unlock( struct picoRTOS_mutex * mutex )
Registers an interrupt/irq to the system
void picoRTOS_register_interrupt( picoRTOS_irq_t irq, picoRTOS_isr_fn fn, void * priv )
Resumes the scheduling.
void picoRTOS_resume( void )
Puts the current task to sleep until next tick
void picoRTOS_schedule( void )
Returns the current task’s priority/identitifer
picoRTOS_pid_t picoRTOS_self( void )
Puts the current task to sleep for the specified number of ticks
void picoRTOS_sleep( picoRTOS_tick_t delay )
Puts the current task to sleep until *ref + period is elapsed.
void picoRTOS_sleep_until( picoRTOS_tick_t * ref, picoRTOS_tick_t period )
Add a task to picoRTOS-SMP & assign it to specific core(s)
void picoRTOS_SMP_add_task( struct picoRTOS_task * task, picoRTOS_priority_t prio, picoRTOS_mask_t core_mask )
Disables an interrupt on the selected cores
void picoRTOS_SMP_disable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Enables an interrupt on the selected cores
void picoRTOS_SMP_enable_interrupt( picoRTOS_irq_t irq, picoRTOS_mask_t core_mask )
Starts the scheduling.
void picoRTOS_start( void )
Suspends the scheduling.
void picoRTOS_suspend( void )
Initialises a task structure
void picoRTOS_task_init( struct picoRTOS_task * task, picoRTOS_task_fn fn, void * priv, picoRTOS_stack_t * stack, size_t stack_count )
Executes a tick increment
extern /*@exposed@*/ /*@null@*/ picoRTOS_stack_t *picoRTOS_tick( picoRTOS_stack_t * sp )
Initializes a PWM block (TC)
int pwm_avr_init( struct pwm_avr * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_avr_pwm_init( struct pwm * ctx, struct pwm_avr * parent, pwm_avr_oc_t oc )
Configures a PWM output
int pwm_avr_pwm_setup( struct pwm * ctx, struct pwm_settings * settings )
Configures a PWM block
int pwm_avr_setup( struct pwm_avr * ctx, struct pwm_avr_settings * settings )
Inits an GD32VF103 TIMER as PWM
int pwm_gd32vf103_init( struct pwm_gd32vf103 * ctx, int base, clock_id_t clkid )
Creates a PWM output from an PWM / TIMER block
int pwm_gd32vf103_pwm_init( struct pwm * ctx, struct pwm_gd32vf103 * parent, size_t channel )
Configures a PWM output
int pwm_gd32vf103_pwm_setup( struct pwm * ctx, struct pwm_gd32vf103_pwm_settings * settings )
Configures an TIMER / PWM
int pwm_gd32vf103_setup( struct pwm_gd32vf103 * ctx, struct pwm_gd32vf103_settings * settings )
Inits an NXP eMIOS block
int pwm_nxp_emios_init( struct pwm_nxp_emios * ctx, int base, clock_id_t clkid )
Creates a PWM output from an eMIOS block
int pwm_nxp_emios_pwm_init( struct pwm * ctx, struct pwm_nxp_emios * parent, size_t channel )
Configures a PWM output from an eMIOS block
int pwm_nxp_emios_pwm_setup( struct pwm * ctx, struct pwm_nxp_emios_pwm_settings * settings )
Configures an eMIOS block
int pwm_nxp_emios_setup( struct pwm_nxp_emios * ctx, struct pwm_nxp_emios_settings * settings )
Initializes a PWM
int pwm_pic32mx_init( struct pwm * ctx, int oc_base, int tc_base, clock_id_t clkid )
Configures a PWM
int pwm_pic32mx_setup( struct pwm * ctx, struct pwm_pic32mx_settings * settings )
Inits an Reneas RA4 GPT PWM timer
int pwm_renesas_ra4_gpt_init( struct pwm_renesas_ra4_gpt * ctx, int base, clock_id_t clkid )
Creates a PWM output from a GPT timer
int pwm_renesas_ra4_gpt_pwm_init( struct pwm * ctx, struct pwm_renesas_ra4_gpt * parent, pwm_renesas_ra4_gpt_output_t output )
Configures a PWM output
int pwm_renesas_ra4_gpt_pwm_setup( struct pwm * ctx, struct pwm_renesas_ra4_gpt_pwm_settings * settings )
Initializes a PWM block
int pwm_rp2040_init( struct pwm_rp2040 * ctx, int base, clock_id_t clkid )
Initializes an input PWM
int pwm_rp2040_ipwm_init( struct ipwm * ctx, struct pwm_rp2040 * parent, size_t channel )
Configures an IPWM
int pwm_rp2040_ipwm_setup( struct ipwm * ctx, struct pwm_rp2040_ipwm_settings * settings )
Initializes a PWM output
int pwm_rp2040_pwm_init( struct pwm * ctx, struct pwm_rp2040 * parent, size_t channel, pwm_rp2040_pwm_output_t output )
Initializes a PWM block
int pwm_sam3x_init( struct pwm_sam * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_sam3x_pwm_init( struct pwm * ctx, struct pwm_sam * parent, size_t channel )
Configures a PWM output
int pwm_sam3x_pwm_setup( struct pwm * ctx, struct pwm_sam_pwm_settings * settings )
Configures a PWM block
int pwm_sam3x_setup( struct pwm_sam * ctx, struct pwm_sam_settings * settings )
Initializes a SAME5x TC for PWM
int pwm_same5x_tc_init( struct pwm_same5x_tc * ctx, int base, clock_id_t clkid )
Initializes a SAME5x PWM channel
int pwm_same5x_tc_pwm_init( /*@out@*/ struct pwm * ctx, struct pwm_same5x_tc * parent, size_t channel )
Configures a SAME5x PWM channel
int pwm_same5x_tc_pwm_setup( struct pwm * ctx, struct pwm_same5x_tc_pwm_settings * settings )
Configures a SAME5x TC used as PWM
int pwm_same5x_tc_setup( struct pwm_same5x_tc * ctx, struct pwm_same5x_tc_settings * settings )
Defines a PWM duty cycle
int pwm_set_duty_cycle( struct pwm * ctx, pwm_duty_cycle_t duty_cycle )
Defines a PWM period
int pwm_set_period( struct pwm * ctx, pwm_period_us_t period )
Starts the PWM
void pwm_start( struct pwm * ctx )
Initializes a STM32H7xx TIM for PWM
int pwm_stm32h7xx_tim_init( struct pwm_stm32h7xx_tim * ctx, int base, clock_id_t clkid, size_t channel_count )
Initializes a STM32H7xx PWM channel
int pwm_stm32h7xx_tim_pwm_init( struct pwm * ctx, struct pwm_stm32h7xx_tim * parent, size_t channel )
Configures a STM32H7xx PWM channel
int pwm_stm32h7xx_tim_pwm_setup( struct pwm * ctx, struct pwm_stm32h7xx_tim_pwm_settings * settings )
Configures a STM32H7xx TIM used as PWM
int pwm_stm32h7xx_tim_setup( struct pwm_stm32h7xx_tim * ctx, struct pwm_stm32h7xx_tim_settings * settings )
Stops the PWM
void pwm_stop( struct pwm * ctx )
Inits an TI_EPWM block
int pwm_ti_epwm_init( struct pwm_ti_epwm * ctx, int base, clock_id_t clkid )
Creates a PWM output from an TI_EPWM block
int pwm_ti_epwm_pwm_init( struct pwm * ctx, struct pwm_ti_epwm * parent, pwm_ti_epwm_cmp_t cmp )
Configures a PWM output from an TI_EPWM block
int pwm_ti_epwm_pwm_setup( struct pwm * ctx, struct pwm_ti_epwm_pwm_settings * settings )
Configures an TI_EPWM block
int pwm_ti_epwm_setup( struct pwm_ti_epwm * ctx, struct pwm_ti_epwm_settings * settings )
Initializes a PWM block (TCAx)
int pwm_tinyavr_tca_init( struct pwm_tinyavr_tca * ctx, int base, clock_id_t clkid )
Initializes a PWM output
int pwm_tinyavr_tca_pwm_init( struct pwm * ctx, struct pwm_tinyavr_tca * parent, pwm_tinyavr_tca_cmp_t cmp )
Configures a PWM block
int pwm_tinyavr_tca_setup( struct pwm_tinyavr_tca * ctx, struct pwm_tinyavr_tca_settings * settings )
Initializes a SPI
int spi_arm_pl022_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a ARM PL022 SPI
int spi_arm_pl022_setup( struct spi * ctx, struct spi_arm_pl022_settings * settings )
Initializes a SERCOM SPI
int spi_atmel_sercom_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a SERCOM SPI
int spi_atmel_sercom_setup( struct spi * ctx, struct spi_atmel_sercom_settings * settings )
Initializes a SPI
int spi_avr_init( struct spi * ctx, int base, spi_avr_speed_t speed )
Inits an USART in SPI master mode
int spi_avr_usart_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_gd32vf103_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a NXP SPI/DSPI interface
int spi_nxp_dspi_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_pic32mx_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_renesas_ra4_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_sam3x_init( struct spi * ctx, int base, clock_id_t clkid )
Sets SPI to loopback mode for tests
int spi_sam3x_set_loopback( struct spi * ctx, bool loopback )
Configure a SPI interface
int spi_setup( struct spi * ctx, const struct spi_settings * settings )
Initializes a SPI
int spi_stm32h7xx_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a spi port
int spi_stm32h7xx_setup( struct spi * ctx, struct spi_stm32h7xx_settings * settings )
Inits a SPI
int spi_ti_f28x_init( struct spi * ctx, int base, clock_id_t clkid )
Configures SPI specifics (DMA, loopback)
int spi_ti_f28x_setup( struct spi * ctx, struct spi_ti_f28x_settings * settings )
Initializes a SPI
int spi_tinyavr_init( struct spi * ctx, int base, clock_id_t clkid )
Transfers data over a SPI interface
int spi_xfer( struct spi * ctx, void * rx, const void * tx, size_t n )
Initializes a SPI
int spi_arm_pl022_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a ARM PL022 SPI
int spi_arm_pl022_setup( struct spi * ctx, struct spi_arm_pl022_settings * settings )
Initializes a SERCOM SPI
int spi_atmel_sercom_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a SERCOM SPI
int spi_atmel_sercom_setup( struct spi * ctx, struct spi_atmel_sercom_settings * settings )
Initializes a SPI
int spi_avr_init( struct spi * ctx, int base, spi_avr_speed_t speed )
Inits an USART in SPI master mode
int spi_avr_usart_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_gd32vf103_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a NXP SPI/DSPI interface
int spi_nxp_dspi_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_pic32mx_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_renesas_ra4_init( struct spi * ctx, int base, clock_id_t clkid )
Initializes a SPI
int spi_sam3x_init( struct spi * ctx, int base, clock_id_t clkid )
Sets SPI to loopback mode for tests
int spi_sam3x_set_loopback( struct spi * ctx, bool loopback )
Configure a SPI interface
int spi_setup( struct spi * ctx, const struct spi_settings * settings )
Initializes a SPI
int spi_stm32h7xx_init( struct spi * ctx, int base, clock_id_t clkid )
Configures a spi port
int spi_stm32h7xx_setup( struct spi * ctx, struct spi_stm32h7xx_settings * settings )
Inits a SPI
int spi_ti_f28x_init( struct spi * ctx, int base, clock_id_t clkid )
Configures SPI specifics (DMA, loopback)
int spi_ti_f28x_setup( struct spi * ctx, struct spi_ti_f28x_settings * settings )
Initializes a SPI
int spi_tinyavr_init( struct spi * ctx, int base, clock_id_t clkid )
Transfers data over a SPI interface
int spi_xfer( struct spi * ctx, void * rx, const void * tx, size_t n )
Initializes a SERCOM I2C
int twi_atmel_sercom_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI
int twi_avr_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI/I2C
int twi_dw_apb_i2c_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI/I2C peripheral
int twi_pic32mx_init( struct twi * ctx, int base, clock_id_t clkid )
Polls TWI interface for transfer (slave mode)
int twi_poll( struct twi * ctx )
Read data from a TWI interface
int twi_read( struct twi * ctx, void * buf, size_t n )
Initializes a TWI / I2C
int twi_sam3x_init( struct twi * ctx, int base, clock_id_t clkid )
Configures a TWI interface
int twi_setup( struct twi * ctx, struct twi_settings * settings )
Init an I2C interface
int twi_ti_f28x_init( struct twi * ctx, int base, clock_id_t clkid )
Write data to a TWI interface
int twi_write( struct twi * ctx, const void * buf, size_t n )
Initializes a SERCOM I2C
int twi_atmel_sercom_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI
int twi_avr_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI/I2C
int twi_dw_apb_i2c_init( struct twi * ctx, int base, clock_id_t clkid )
Initializes a TWI/I2C peripheral
int twi_pic32mx_init( struct twi * ctx, int base, clock_id_t clkid )
Polls TWI interface for transfer (slave mode)
int twi_poll( struct twi * ctx )
Read data from a TWI interface
int twi_read( struct twi * ctx, void * buf, size_t n )
Initializes a TWI / I2C
int twi_sam3x_init( struct twi * ctx, int base, clock_id_t clkid )
Configures a TWI interface
int twi_setup( struct twi * ctx, struct twi_settings * settings )
Init an I2C interface
int twi_ti_f28x_init( struct twi * ctx, int base, clock_id_t clkid )
Write data to a TWI interface
int twi_write( struct twi * ctx, const void * buf, size_t n )
Initializes an UART
int uart_arm_pl011_init( struct uart * ctx, int base, clock_id_t clkid )
Sets UART for loopback mode (test)
int uart_arm_pl011_set_loopback( struct uart * ctx, bool loopback )
Initializes a SERCOM UART
int uart_atmel_sercom_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_avr_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_gd32vf103_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART on a LINFLexD interface
int uart_nxp_linflexd_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_pic32mx_init( struct uart * ctx, int base, clock_id_t clkid )
Read data from a UART interface
int uart_read( struct uart * ctx, char * buf, size_t n )
Initializes an UART
int uart_renesas_ra4_sci_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_sam3x_init( struct uart * ctx, int base, clock_id_t clkid )
Configure a UART interface
int uart_setup( struct uart * ctx, const struct uart_settings * settings )
Initializes an UART/USART
int uart_stm32h7xx_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an USART as UART
int uart_tinyavr_usart_init( struct uart * ctx, int base, clock_id_t clkid )
Write data to a UART interface
int uart_write( struct uart * ctx, const char * buf, size_t n )
Initializes an UART
int uart_arm_pl011_init( struct uart * ctx, int base, clock_id_t clkid )
Sets UART for loopback mode (test)
int uart_arm_pl011_set_loopback( struct uart * ctx, bool loopback )
Initializes a SERCOM UART
int uart_atmel_sercom_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_avr_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_gd32vf103_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART on a LINFLexD interface
int uart_nxp_linflexd_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_pic32mx_init( struct uart * ctx, int base, clock_id_t clkid )
Read data from a UART interface
int uart_read( struct uart * ctx, char * buf, size_t n )
Initializes an UART
int uart_renesas_ra4_sci_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an UART
int uart_sam3x_init( struct uart * ctx, int base, clock_id_t clkid )
Configure a UART interface
int uart_setup( struct uart * ctx, const struct uart_settings * settings )
Initializes an UART/USART
int uart_stm32h7xx_init( struct uart * ctx, int base, clock_id_t clkid )
Initializes an USART as UART
int uart_tinyavr_usart_init( struct uart * ctx, int base, clock_id_t clkid )
Write data to a UART interface
int uart_write( struct uart * ctx, const char * buf, size_t n )
Initializes the watchdog timer
int wd_avr_init( struct wd * ctx, int base )
Configures a watchdog timer
int wd_avr_setup( struct wd * ctx, struct wd_avr_settings * settings )
Initializes a free watchdog timer
int wd_gd32vf103_fwdgt_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a watchdog
int wd_gd32vf103_fwdgt_setup( struct wd * ctx, struct wd_gd32vf103_fwdgt_settings * settings )
Initializes a watchdog
int wd_pic32mx_init( struct wd * ctx, int base )
Configures the watchdog
int wd_pic32mx_setup( struct wd * ctx, struct wd_pic32mx_settings * settings )
Refreshes the watchdog
void wd_refresh( struct wd * ctx )
Initializes a watchdog timer
int wd_rp2040_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a WD
int wd_rp2040_setup( struct wd * ctx, struct wd_rp2040_settings * settings )
Initializes a watchdog timer
int wd_sam3x_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a WD
int wd_sam3x_setup( struct wd * ctx, struct wd_sam3x_settings * settings )
Initializes a watchdog timer
int wd_same5x_init( struct wd * ctx, int base )
Configures a watchdog
int wd_same5x_setup( struct wd * ctx, struct wd_same5x_settings * settings )
Starts the watchdog
int wd_start( struct wd * ctx )
Initializes a free-running watchdog timer
int wd_stm32h7xx_iwdg_init( /*@out@*/ struct wd * ctx, int base, clock_id_t clkid )
Configures a IWDG watchdog
int wd_stm32h7xx_iwdg_setup( struct wd * ctx, struct wd_stm32h7xx_iwdg_settings * settings )
Stops the watchdog
int wd_stop( struct wd * ctx )
Init a watchdog
int wd_ti_f28x_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a watchdog
int wd_ti_f28x_setup( struct wd * ctx, struct wd_ti_f28x_settings * settings )
Initializes the watchdog timer
int wd_tinyavr_init( struct wd * ctx, int base )
Configures a watchdog timer
int wd_tinyavr_setup( struct wd * ctx, struct wd_tinyavr_settings * settings )
Initializes the watchdog timer
int wd_avr_init( struct wd * ctx, int base )
Configures a watchdog timer
int wd_avr_setup( struct wd * ctx, struct wd_avr_settings * settings )
Initializes a free watchdog timer
int wd_gd32vf103_fwdgt_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a watchdog
int wd_gd32vf103_fwdgt_setup( struct wd * ctx, struct wd_gd32vf103_fwdgt_settings * settings )
Initializes a watchdog
int wd_pic32mx_init( struct wd * ctx, int base )
Configures the watchdog
int wd_pic32mx_setup( struct wd * ctx, struct wd_pic32mx_settings * settings )
Refreshes the watchdog
void wd_refresh( struct wd * ctx )
Initializes a watchdog timer
int wd_rp2040_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a WD
int wd_rp2040_setup( struct wd * ctx, struct wd_rp2040_settings * settings )
Initializes a watchdog timer
int wd_sam3x_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a WD
int wd_sam3x_setup( struct wd * ctx, struct wd_sam3x_settings * settings )
Initializes a watchdog timer
int wd_same5x_init( struct wd * ctx, int base )
Configures a watchdog
int wd_same5x_setup( struct wd * ctx, struct wd_same5x_settings * settings )
Starts the watchdog
int wd_start( struct wd * ctx )
Initializes a free-running watchdog timer
int wd_stm32h7xx_iwdg_init( /*@out@*/ struct wd * ctx, int base, clock_id_t clkid )
Configures a IWDG watchdog
int wd_stm32h7xx_iwdg_setup( struct wd * ctx, struct wd_stm32h7xx_iwdg_settings * settings )
Stops the watchdog
int wd_stop( struct wd * ctx )
Init a watchdog
int wd_ti_f28x_init( struct wd * ctx, int base, clock_id_t clkid )
Configures a watchdog
int wd_ti_f28x_setup( struct wd * ctx, struct wd_ti_f28x_settings * settings )
Initializes the watchdog timer
int wd_tinyavr_init( struct wd * ctx, int base )
Configures a watchdog timer
int wd_tinyavr_setup( struct wd * ctx, struct wd_tinyavr_settings * settings )