Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Typedefinitions

Hello all,

I am developing on the nrf52 dk. and the following type definitions should be defined according to the given library.

Would somebody please comment if that works ok for the SDK5 ver 17.0.2 :

//MCU specific types. Depending on the plattform which is used.
typedef uint8_t Byte
typedef uint16_t Word;
typedef uint32_t uint_32;
typedef int int_32;

Much appreciated for any reply.

Best.

Parents Reply Children
  • MuRa said:
    As far as I understand this is kind of a proxy "variable name" for the code behind?

    Yes, those lines simply creates new names for the uintx_t types.

    MuRa said:
    in particular is that need at all?

    If I understood your question correctly (and please correct me if I did not), you have an external library that you want to integrate into the nRF5 SDK?

    And that library expects the types Byte, Word uint_32 and int_32?

    Then yes, adding those typedefs would be necessary for the external library to compile properly. The other alternative would be to go through the source code of the external library and change all the type definitions manually, but that is probably not something you want to do.

  • You understood right, thank you, you confirmed what I was thinking...

Related