whiskers 0.2.0
RP2350 BadUSB Tool
Loading...
Searching...
No Matches
standard.h File Reference

Detailed Description

Miscellaneous/Utility HAL functions.

Author
zane

This file contains stuff like sleeps, timing functions, watchdog functions.

It also contains hal_init() which sets stuff up required for the HAL. Mainly the serial connection for printf.

#include <stdint.h>
#include "shared.h"

Go to the source code of this file.

Functions

void hal_init ()
 Initializes the HAL. Must be called first in any program.
void hal_init_watchdog (uint32_t ms_timeout)
 Initializes the watchdog.
void hal_deinit_watchdog ()
 De-initializes the watchdog.
void hal_watchdog_update ()
 Updates the watchdog and refreshes it's timer.
void hal_sleep_ms (uint32_t ms)
 Suspends the active core for specified amount of milliseconds.
uint32_t hal_get_ms_since_boot ()
 Gets amount of time since boot.
void hal_core1_entry (void(*entry)(void))
 Launches an entry function on core1.
void print_chip_info ()
 Prints out chip information.
void get_board_serial (char out[13])
 Gets the serial number of the board vll_wsk_01**.

Function Documentation

◆ get_board_serial()

void get_board_serial ( char out[13])

Gets the serial number of the board vll_wsk_01**.

Parameters
outOut buffer for the returned string.

◆ hal_core1_entry()

void hal_core1_entry ( void(* entry )(void))

Launches an entry function on core1.

Parameters
entryThe pointer to the entry function. This must be a function with no parameters with a void return type.

Note this function only does anything on multicore enabled chips.

◆ hal_get_ms_since_boot()

uint32_t hal_get_ms_since_boot ( )

Gets amount of time since boot.

Returns
Milliseconds since boot.

◆ hal_init_watchdog()

void hal_init_watchdog ( uint32_t ms_timeout)

Initializes the watchdog.

Parameters
ms_timeoutHow many milliseconds of timeout before the watchdog resets the chip.

◆ hal_sleep_ms()

void hal_sleep_ms ( uint32_t ms)

Suspends the active core for specified amount of milliseconds.

Parameters
msMilliseconds to sleep for.