|
40 | 40 | CHANNEL_INDEX_UART_TX_LENGTH, |
41 | 41 | CHANNEL_INDEX_UART_CONTROL, |
42 | 42 | CHANNEL_INDEX_COLOURTAIL_LENGTH, |
43 | | -CHANNEL_INDEX_COLOURTAIL_CONTROL) = range(5, 25) |
| 43 | +CHANNEL_INDEX_COLOURTAIL_CONTROL, |
| 44 | +CHANNEL_INDEX_PWM_CONF_0, |
| 45 | +CHANNEL_INDEX_PWM_CONF_1, |
| 46 | +CHANNEL_INDEX_PWM_CONF_2) = range(5, 31) |
44 | 47 |
|
45 | 48 | EXTENSION_CONF_IO = 0x01 |
46 | 49 | EXTENSION_CONF_SPI = 0x02 |
@@ -161,6 +164,20 @@ def set_leg_io(self, leg_index, direction): |
161 | 164 | self.and_mask(CHANNEL_INDEX_IO_DIRECTION_EXT, clear_mask) |
162 | 165 | self.or_mask(CHANNEL_INDEX_IO_DIRECTION_EXT, direction_mask) |
163 | 166 |
|
| 167 | + def pwm_on(self, t2_prescale, full_period, on_period): |
| 168 | + """Turns on the PWM generator with the given settings.""" |
| 169 | + # self.set |
| 170 | + pass |
| 171 | + |
| 172 | + def pwm_freq(self, frequency): |
| 173 | + """Turns on the PWM generator with the given frequency.""" |
| 174 | + # calculate pwm settings |
| 175 | + # self.pwm_on(settings) |
| 176 | + pass |
| 177 | + |
| 178 | + def pwm_off(self): |
| 179 | + pass |
| 180 | + |
164 | 181 | def clear(self): |
165 | 182 | """Clears the pixels on CodeBug. |
166 | 183 |
|
|
0 commit comments