This is the multi-page printable view of this section. Click here to print...

Return to the regular view of this page

As of 2025-09-10

AHI Functions and Explanations for Random Numbers

Explanations of the TWENET library and AHI functions related to random numbers
    This section provides explanations of the TWENET library and AHI functions related to random numbers.

    Random (Random Numbers)

    Implementation of AHI-compatible functions related to random number generation.

    vAHI_Start|StopRandomNumberGenerator()

    void vAHI_StartRandomNumberGenerator(bool_t const bMode, bool_t const bIntEn);
    void vAHI_StopRandomNumberGenerator(void);

    Starts or stops random number generation.

    u16AHI_ReadRandomNumber()

    uint16 u16AHI_ReadRandomNumber(void);

    Reads a 16-bit random value.

    • If random number generation has not been started, returns 57005.

    u32AHI_ReadRandomNumber_MW()

    uint32 u32AHI_ReadRandomNumber_MW(void);

    (TWELITE GOLD only) Reads a 32-bit random value.

    • If random number generation has not been started, returns 3735928559.

    vAHI_ReinitRandomNumberGenerator_MW()

    void vAHI_ReinitRandomNumberGenerator_MW();

    (TWELITE GOLD only) Reinitializes the random number generator device.