microblaze_timer.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * (C) Copyright 2007 Michal Simek
  3. *
  4. * Michal SIMEK <monstr@monstr.cz>
  5. *
  6. * See file CREDITS for list of people who contributed to this
  7. * project.
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of
  12. * the License, or (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  22. * MA 02111-1307 USA
  23. */
  24. #define TIMER_ENABLE_ALL 0x400 /* ENALL */
  25. #define TIMER_PWM 0x200 /* PWMA0 */
  26. #define TIMER_INTERRUPT 0x100 /* T0INT */
  27. #define TIMER_ENABLE 0x080 /* ENT0 */
  28. #define TIMER_ENABLE_INTR 0x040 /* ENIT0 */
  29. #define TIMER_RESET 0x020 /* LOAD0 */
  30. #define TIMER_RELOAD 0x010 /* ARHT0 */
  31. #define TIMER_EXT_CAPTURE 0x008 /* CAPT0 */
  32. #define TIMER_EXT_COMPARE 0x004 /* GENT0 */
  33. #define TIMER_DOWN_COUNT 0x002 /* UDT0 */
  34. #define TIMER_CAPTURE_MODE 0x001 /* MDT0 */
  35. typedef volatile struct microblaze_timer_t {
  36. int control; /* control/statuc register TCSR */
  37. int loadreg; /* load register TLR */
  38. int counter; /* timer/counter register */
  39. } microblaze_timer_t;