Revision 10
Update timer.c
i8254.h | ||
---|---|---|
35 | 35 |
#define TIMER_LSB BIT(4) /**< @brief Initialize Counter LSB only */ |
36 | 36 |
#define TIMER_MSB BIT(5) /**< @brief Initialize Counter MSB only */ |
37 | 37 |
#define TIMER_LSB_MSB (TIMER_LSB | TIMER_MSB) /**< @brief Initialize LSB first and MSB afterwards */ |
38 |
#define TIMER_INMODE_MASK 0x30 |
|
38 |
#define TIMER_INMODE_MASK 0x30 //0011 0000
|
|
39 | 39 |
#define TIMER_INMODE_POS 4 |
40 | 40 |
|
41 | 41 |
/* Operating mode: bits 3, 2 and 1 */ |
42 | 42 |
|
43 | 43 |
#define TIMER_SQR_WAVE (BIT(2) | BIT(1)) /**< @brief Mode 3: square wave generator */ |
44 | 44 |
#define TIMER_RATE_GEN BIT(2) /**< @brief Mode 2: rate generator */ |
45 |
#define TIMER_MODE_MASK 0x0e /**< @brief Mask for mode */
|
|
45 |
#define TIMER_MODE_MASK 0x0E /**< @brief Mask for mode */
|
|
46 | 46 |
#define TIMER_MODE_POS 1 /**< @brief Position of smallest bit from mode */ |
47 | 47 |
|
48 | 48 |
/* Counting mode: bit 0 */ |
Also available in: Unified diff