sb_def.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * sb_def.h
  3. * Samsung Mobile Battery DEF Header
  4. *
  5. * Copyright (C) 2012 Samsung Electronics, Inc.
  6. *
  7. *
  8. * This software is licensed under the terms of the GNU General Public
  9. * License version 2, as published by the Free Software Foundation, and
  10. * may be copied, distributed, and modified under those terms.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. */
  18. #ifndef __SB_DEF_H
  19. #define __SB_DEF_H __FILE__
  20. enum sb_dev_type {
  21. SB_DEV_UNKNOWN = 0,
  22. SB_DEV_BATTERY,
  23. SB_DEV_DIRECT_CHARGER,
  24. SB_DEV_DUAL_BATTERY,
  25. SB_DEV_CHARGER,
  26. SB_DEV_FUEL_GAUGE,
  27. SB_DEV_WIRELESS_CHARGER,
  28. SB_DEV_LIMITTER,
  29. SB_DEV_DIVIDER,
  30. SB_DEV_MODULE,
  31. SB_DEV_MAX,
  32. };
  33. typedef unsigned long long sb_data;
  34. #define cast_to_sb_data(data) ((sb_data)(data))
  35. #define cast_to_sb_pdata(data) ((sb_data *)(data))
  36. #define cast_sb_data(type, data) ((type)(data))
  37. #define cast_sb_data_ptr(type, data) ((type *)(data))
  38. #define cast_sb_pdata(type, pdata) ((type)(*pdata))
  39. #define cast_sb_pdata_ptr(type, pdata) ((type *)(*pdata))
  40. #endif /* __SB_DEF_H */