Micro template library A library for building device drivers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

45 lines
1.5 KiB

  1. /*!
  2. * \file utl/core/types.h
  3. * \brief Basic type alias support
  4. *
  5. * \copyright
  6. * Copyright (C) 2018 Christos Choutouridis <christos@choutouridis.net>\n
  7. * This program is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU Lesser General Public License as
  9. * published by the Free Software Foundation, either version 3
  10. * of the License, or (at your option) any later version.\n
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Lesser General Public License for more details.\n
  15. * You should have received a copy of the GNU Lesser General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #ifndef __utl_core_types_h__
  19. #define __utl_core_types_h__
  20. #include <cstddef>
  21. #include <cstdint>
  22. //#include <type_traits>
  23. namespace utl {
  24. //! \name byte and word types
  25. //! @{
  26. using byte_t = uint8_t; //!< 8 bits wide
  27. using word_t = uint16_t; //!< 16 bits wide
  28. using dword_t = uint32_t; //!< 32 bits wide
  29. //! @}
  30. //! \name size and index
  31. //! @{
  32. using size_t = std::size_t;
  33. using index_t = size_t; //!< index_t and size_t mend to be interchangeable
  34. using ptrdiff_t= std::ptrdiff_t;
  35. //! @}
  36. }
  37. #endif /* __utl_core_types_h__ */