Module rp2040_hal::rom_data[][src]

Expand description

Functions and data from the RPI Bootrom.

Functions

Return the number of consecutive high order 0 bits of value. If value is zero, returns 32.

Restore all QSPI pad controls to their default state, and connect the SSI to the QSPI pads.

The Raspberry Pi Trading Ltd copyright string.

Return the number of consecutive low order 0 bits of value. If value is zero, returns 32.

Return a + b

Computes the arc tangent of y/x using the signs of arguments to determine the correct quadrant

Compares two floating point numbers, returning: • 0 if a == b • -1 if a < b • 1 if a > b

Return the cosine of angle. angle is in radians, and must be in the range -1024 to 1024

Return a / b

Return the exponential value of v, i.e. so

Return the natural logarithm of v. If v <= 0 return -Infinity

Return a * b

Convert a double to an unsigned fixed point integer representation where n specifies the position of the binary point in the resulting fixed point representation, e.g. _double2ufix(0.5f, 16) == 0x8000. This method rounds towards -Infinity, and clamps the resulting integer to lie within the range 0x00000000 to 0xFFFFFFFF

Convert a double to a signed fixed point 64-bit integer representation where n specifies the position of the binary point in the resulting fixed point representation - e.g. _double2fix(0.5f, 16) == 0x8000. This method rounds towards -Infinity, and clamps the resulting integer to lie within the range -0x8000000000000000 to 0x7FFFFFFFFFFFFFFF

Converts a double to a float

Convert a double to a signed integer, rounding towards -Infinity, and clamping the result to lie within the range -0x80000000 to 0x7FFFFFFF

Convert a double to a signed 64-bit integer, rounding towards -Infinity, and

Convert a double to an unsigned integer, rounding towards -Infinity, and clamping the result to lie within the range 0x00000000 to 0xFFFFFFFF 0x24 double_to_uint(v: f64) -> u32;

Convert a double to an unsigned fixed point 64-bit integer representation where n specifies the position of the binary point in the resulting fixed point representation, e.g. _double2ufix(0.5f, 16) == 0x8000. This method rounds towards -Infinity, and clamps the resulting integer to lie within the range 0x0000000000000000 to 0xFFFFFFFFFFFFFFFF

Convert a double to an unsigned 64-bit integer, rounding towards -Infinity, and clamping the result to lie within the range 0x0000000000000000 to 0xFFFFFFFFFFFFFFFF

Return the sine of angle. angle is in radians, and must be in the range -1024 to 1024

Return sqrt(v) or -Infinity if v is negative

Return a - b

Return the tangent of angle. angle is in radians, and must be in the range -1024 to 1024

Return a + b.

Computes the arc tangent of y/x using the signs of arguments to determine the correct quadrant.

Compares two floating point numbers, returning:

Return the cosine of angle. angle is in radians, and must be in the range -128 to 128.

Return a / b.

Return the exponential value of v, i.e. so e^v.

Convert a signed fixed point 64-bit integer representation to the nearest double value, rounding to even on tie. n specifies the position of the binary point in fixed point, so f = nearest(v/(2^n))

Convert a signed fixed point integer representation to the nearest float value, rounding to even on tie. n specifies the position of the binary point in fixed point, so f = nearest(v/2^n).

Convert a signed fixed point integer representation to the nearest double value, rounding to even on tie. n specifies the position of the binary point in fixed point, so f = nearest(v/(2^n))

Convert a signed fixed point integer representation to the nearest float value, rounding to even on tie. n specifies the position of the binary point in fixed point, so f = nearest(v/2^n).

Configure the SSI to generate a standard 03h serial read command, with 24 address bits, upon each XIP access. This is a very slow XIP configuration, but is very widely supported. The debugger calls this function after performing a flash erase/programming operation, so that the freshly-programmed code and data is visible to the debug host, without having to know exactly what kind of flash device is connected.

First set up the SSI for serial-mode operations, then issue the fixed XIP exit sequence. Note that the bootrom code uses the IO forcing logic to drive the CS pin, which must be cleared before returning the SSI to XIP mode (e.g. by a call to _flash_flush_cache). This function configures the SSI with a fixed SCK clock divisor of /6.

Flush and enable the XIP cache. Also clears the IO forcing on QSPI CSn, so that the SSI can drive the flashchip select as normal.

Erase a count bytes, starting at addr (offset from start of flash). Optionally, pass a block erase command e.g. D8h block erase, and the size of the block erased by this command — this function will use the larger block erase where possible, for much higher erase speed. addr must be aligned to a 4096-byte sector, and count must be a multiple of 4096 bytes.

Program data to a range of flash addresses starting at addr (offset from the start of flash) and count bytesin size. addr must be aligned to a 256-byte boundary, and count must be a multiple of 256.

Return the natural logarithm of v. If v <= 0 return -Infinity.

Convert a float to an unsigned fixed point 64-bit integer representation where n specifies the position of the binary point in the resulting fixed point representation, e.g. _float2ufix(0.5f, 16) == 0x8000. This method rounds towards -Infinity, and clamps the resulting integer to lie within the range 0x0000000000000000 to 0xFFFFFFFFFFFFFFFF 0x78 float_to_ufix64(v: f32, n: i32) -> u64; Converts a float to a double.

Convert a float to a signed fixed point integer reprsentation where n specifies the position of the binary point in the resulting fixed point representation. e.g. float_to_fix(0.5, 16) == 0x8000. This method rounds towards -INFINITY, and clamps the resulting integer to lie within the range -800000000 to 0x7FFFFFFF.

Convert a float to a signed fixed point 64-bit integer representation where n specifies the position of the binary point in the resulting fixed point representation - e.g. _float2fix(0.5f, 16) == 0x8000. This method rounds towards -Infinity, and clamps the resulting integer to lie within the range -0x8000000000000000 to 0x7FFFFFFFFFFFFFF

Convert a float to a signed integer, rounding towards -INFINITY, and clamping the result to lie within the range -0x80000000 to 0x7FFFFFFF.

Convert a float to a signed 64-bit integer, rounding towards -Infinity, and clamping the result to lie within the range -0x8000000000000000 to 0x7FFFFFFFFFFFFFFF

Convert a float to an unsigned fixed point integer representation where n specifies the position of the binary point in the resulting fixed point representation, e.g. float_to_ufix(0.5f, 16) == 0x8000. This method rounds towards -Infinity, and clamps the resulting integer to lie within the range 0x00000000 to 0xFFFFFFFF.

Convert a float to an unsigned integer, rounding towards -INFINITY, and clamping the result to lie within the range 0x00000000 to 0xFFFFFFFF

Convert a float to an unsigned 64-bit integer, rounding towards -Infinity, and clamping the result to lie within the range 0x0000000000000000 to 0xFFFFFFFFFFFFFFFF

Return a * b.

The end address of the floating point library code and data.

The start address of the floating point library code and data. This and fplib_end along with the individual function pointers in soft_float_table can be used to copy the floating point implementation into RAM if desired.

Return the sine of angle. angle is in radians, and must be in the range -128 to 128.

Return the square root of v or -INFINITY if v is negative.

Return a - b.

Return the tangent of angle. angle is in radians, and must be in the range -128 to 128.

The 8 most significant hex digits of the Bootrom git revision.

Convert a signed 64-bit integer to the nearest double value, rounding to even on tie

Convert a signed 64-bit integer to the nearest float value, rounding to even on tie.

Convert a signed integer to the nearest double value, rounding to even on tie

Convert a signed integer to the nearest float value, rounding to even on tie.

Copies n bytes starting at src to dest and returns dest. The results are undefined if the regions overlap.

Copies n bytes starting at src to dest and returns dest. The results are undefined if the regions overlap. Note this is a slightly more efficient variant of _memcpy that may only be used if dest and src are word aligned.

Sets n bytes start at ptr to the value c and returns ptr

Sets n bytes start at ptr to the value c and returns ptr. Note this is a slightly more efficient variant of _memset that may only be used if ptr is word aligned.

Return a count of the number of 1 bits in value.

Resets the RP2040 and uses the watchdog facility to re-start in BOOTSEL mode:

Return the bits of value in the reverse order.

This entry is only present in the V2 bootrom. See Table 182 for the contents of this table.

See Table 181 for the contents of this table.

Convert an unsigned fixed point 64-bit integer representation to the nearest double value, rounding to even on tie. n specifies the position of the binary point in fixed point, so f = nearest(v/(2^n))

Convert an unsigned fixed point integer representation to the nearest float value, rounding to even on tie. n specifies the position of the binary point in fixed point, so f = nearest(v/2^n).

Convert an unsigned fixed point integer representation to the nearest double value, rounding to even on tie. n specifies the position of the binary point in fixed point, so f = nearest(v/(2^n))

Convert a unsigned fixed point integer representation to the nearest float value, rounding to even on tie. n specifies the position of the binary point in fixed point, so f = nearest(v/2^n).

Convert an unsigned 64-bit integer to the nearest double value, rounding to even on tie

Convert an unsigned 64-bit integer to the nearest float value, rounding to even on tie.

Convert an unsigned integer to the nearest double value, rounding to even on tie

Convert an unsigned integer to the nearest float value, rounding to even on tie.

This is the method that is entered by core 1 on reset to wait to be launched by core 0. There are few cases where you should call this method (resetting core 1 is much better). This method does not return and should only ever be called on core 1.

Type Definitions

A bootrom function table code.