Skip to main content
Panagiotis
Associate III
Dec 12, 2019 3:29 PM UTC
Question

static_cast in C?

freqError = static_cast<int32_t>(readRegister(REG_FREQ_ERROR_MSB) & B111);

C has no static_cast, so how can I convert the above code to C?

(It 's C++, from Arduino)

    This topic has been closed for replies.

    2 replies

    berendi
    Principal
    Dec 12, 2019 4:21 PM UTC
    freqError = (int32_t)(readRegister(REG_FREQ_ERROR_MSB) & B111);

    Panagiotis
    Associate III
    Dec 12, 2019 5:12 PM UTC

    Thank you!