This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

HANDLE and DWORD variable types

Is there a way to use the HANDLE and DWORD variable types with the Cx51 & 8051? And if so, do I need to use a certain '#include'? Thanks!

Parents
  • These are not 'C' standard types.

    Therefore, you need to look at the available data types in the C51 Manual and create your own suitable typedefs or #defines as required.

    The same would apply for any other compiler.

    Note that "DWORD" is a poor choice for a type name, as it gives no direct indication of its size or whether or not it is signed.
    Hence I always prefer things like:
    U8 - unsigned, 8 bits;
    S16 - signed, 16 bits;
    etc

Reply
  • These are not 'C' standard types.

    Therefore, you need to look at the available data types in the C51 Manual and create your own suitable typedefs or #defines as required.

    The same would apply for any other compiler.

    Note that "DWORD" is a poor choice for a type name, as it gives no direct indication of its size or whether or not it is signed.
    Hence I always prefer things like:
    U8 - unsigned, 8 bits;
    S16 - signed, 16 bits;
    etc

Children