Show cursor
(&self)
| 211 | |
| 212 | // Show cursor |
| 213 | fn cur_show(&self) |
| 214 | { |
| 215 | let mut address: Port<u8> = Port::new(CRTC_ADDRESS_REG); |
| 216 | let mut data: Port<u8> = Port::new(CRTC_DATA_REG); |
| 217 | |
| 218 | // The row that the cursor begins on |
| 219 | let cur_start = 13; |
| 220 | |
| 221 | // The row that the cursor ends at |
| 222 | let cur_end = 14; |
| 223 | |
| 224 | unsafe |
| 225 | { |
| 226 | // The start register of the cursor |
| 227 | address.write(0x0A); |
| 228 | let b = data.read(); |
| 229 | data.write((b & 0xC0) | cur_start); |
| 230 | |
| 231 | |
| 232 | // The end register of the cursor |
| 233 | address.write(0x0B); |
| 234 | let b = data.read(); |
| 235 | data.write((b & 0xE0) | cur_end); |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | |
| 240 | // Write cursor |
no test coverage detected