splash.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * Copyright (C) 2013, Boundary Devices <info@boundarydevices.com>
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  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. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., http://www.fsf.org/about/contact/
  20. */
  21. #ifndef _SPLASH_H_
  22. #define _SPLASH_H_
  23. #include <errno.h>
  24. enum splash_storage {
  25. SPLASH_STORAGE_NAND,
  26. SPLASH_STORAGE_SF,
  27. SPLASH_STORAGE_MMC,
  28. SPLASH_STORAGE_USB,
  29. SPLASH_STORAGE_SATA,
  30. };
  31. enum splash_flags {
  32. SPLASH_STORAGE_RAW,
  33. SPLASH_STORAGE_FS,
  34. };
  35. struct splash_location {
  36. char *name;
  37. enum splash_storage storage;
  38. enum splash_flags flags;
  39. u32 offset; /* offset from start of storage */
  40. char *devpart; /* Use the load command dev:part conventions */
  41. char *mtdpart; /* MTD partition for ubi part */
  42. char *ubivol; /* UBI volume-name for ubifsmount */
  43. };
  44. #ifdef CONFIG_SPLASH_SOURCE
  45. int splash_source_load(struct splash_location *locations, uint size);
  46. #else
  47. static inline int splash_source_load(struct splash_location *locations,
  48. uint size)
  49. {
  50. return 0;
  51. }
  52. #endif
  53. int splash_screen_prepare(void);
  54. #ifdef CONFIG_SPLASH_SCREEN_ALIGN
  55. void splash_get_pos(int *x, int *y);
  56. #else
  57. static inline void splash_get_pos(int *x, int *y) { }
  58. #endif
  59. #if defined(CONFIG_SPLASH_SCREEN) && defined(CONFIG_LCD)
  60. int lcd_splash(ulong addr);
  61. #else
  62. static inline int lcd_splash(ulong addr)
  63. {
  64. return -ENOSYS;
  65. }
  66. #endif
  67. #define BMP_ALIGN_CENTER 0x7FFF
  68. #endif