- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

# chip/at32uc3a3/include/chip/twis.h

Go to the documentation of this file.

    00001
    00041 #ifndef CHIP_TWIS_H_INCLUDED
    00042 #define CHIP_TWIS_H_INCLUDED
    00043
    00044 #include <chip/memory-map.h>
    00045 #include <chip/irq-map.h>
    00046 #include <stddef.h>
    00047
    00056 static inline void *get_twis_regs(unsigned int id)
    00057 {
    00058         assert(id <= 1);
    00059
    00060         switch (id) {
    00061         case 0:
    00062                 return (void *)TWIS0_BASE;
    00063         case 1:
    00064                 return (void *)TWIS1_BASE;
    00065         default:
    00066                 unhandled_case(id);
    00067                 return NULL;
    00068         }
    00069 }
    00070
    00078 static inline unsigned int get_twis_irq(unsigned int id)
    00079 {
    00080         assert(id <= 1);
    00081
    00082         switch (id) {
    00083         case 0:
    00084                 return TWIS0_IRQ;
    00085         case 1:
    00086                 return TWIS1_IRQ;
    00087         default:
    00088                 return 0;
    00089         }
    00090 }
    00091
    00092 #endif /* CHIP_TWIS_H_INCLUDED */
    00093