Device.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //==============================================================================
  2. // Purpose: Intitialisierung von Betriebsmodus, Clock;
  3. // GPIO-Funktionen
  4. //
  5. // Created on: 20.04.2012 by IPE
  6. //
  7. // History
  8. // 20.04.2012 neu, T.Maurer
  9. //==============================================================================
  10. #ifndef __DEVICE_H__
  11. #define __DEVICE_H__
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. //MACROS
  16. //Pins des MPC
  17. #define READ_INPIN(NR) SIU.GPDI[NR].B.PDI
  18. #define SET_OUTPIN(NR) SIU.GPDO[NR].B.PDO=1
  19. #define CLEAR_OUTPIN(NR) SIU.GPDO[NR].B.PDO=0
  20. #define TOGGLE_OUTPIN(NR) SIU.GPDO[NR].B.PDO = (SIU.GPDO[NR].B.PDO)?0:1
  21. #define GET_OUTPIN_VAL(NR) SIU.GPDO[NR].B.PDO
  22. //PROTOTYPES
  23. void init_Device(void);
  24. //----------------------
  25. //extern void initMODE(void);
  26. //extern void setPLL(void);
  27. //extern void disableWatchdog(void);
  28. void Asm_initIrqVectors( void );
  29. //extern void initINTC(void);
  30. //extern void enableIrq(void);
  31. void initMODE(void);
  32. void setPLL(void);
  33. void disableWatchdog(void);
  34. void initINTC(void);
  35. void init_Mode_and_Clock(void);
  36. //asm void initIrqVectors(void);
  37. //extern void initINTC(void);
  38. void enableIrq(void);
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif /* ifndef*/