Lines Matching refs:pit
911 let mut pit = self.pit_counter.lock(); in run() localVariable
912 pit.timer_handler(); in run()
925 pit: Pit, field
952 fn write_command(pit: &mut Pit, command: u8) { in write_command()
953 pit.write(pit_bus_address(PortIOSpace::PortCommand), &[command]) in write_command()
957 fn write_speaker(pit: &mut Pit, command: u8) { in write_speaker()
958 pit.write(pit_bus_address(PortIOSpace::PortSpeaker), &[command]) in write_speaker()
962 fn write_counter(pit: &mut Pit, counter_idx: usize, data: u16, access_mode: CommandAccess) { in write_counter()
973 pit.write(pit_bus_address(port), &[(data & 0xff) as u8]); in write_counter()
978 pit.write(pit_bus_address(port), &[(data >> 8) as u8]); in write_counter()
983 fn read_counter(pit: &mut Pit, counter_idx: usize, expected: u16, access_mode: CommandAccess) { in read_counter()
995 pit.read(pit_bus_address(port), &mut buffer); in read_counter()
1002 pit.read(pit_bus_address(port), &mut buffer); in read_counter()
1012 pit: Pit::new(irqfd.try_clone().unwrap(), clock.clone()).unwrap(), in set_up()
1040 &mut data.pit, in write_and_latch()
1043 write_counter(&mut data.pit, 0, 24, CommandAccess::CommandRWBoth); in write_and_latch()
1049 &mut data.pit, in write_and_latch()
1054 read_counter(&mut data.pit, 0, 23, CommandAccess::CommandRWBoth); in write_and_latch()
1058 &mut data.pit, in write_and_latch()
1061 write_counter(&mut data.pit, 1, 314, CommandAccess::CommandRWBoth); in write_and_latch()
1064 &mut data.pit, in write_and_latch()
1068 read_counter(&mut data.pit, 1, 313, CommandAccess::CommandRWBoth); in write_and_latch()
1072 &mut data.pit, in write_and_latch()
1075 write_counter(&mut data.pit, 2, 0xffff, CommandAccess::CommandRWBoth); in write_and_latch()
1078 &mut data.pit, in write_and_latch()
1082 read_counter(&mut data.pit, 2, 0xfffe, CommandAccess::CommandRWBoth); in write_and_latch()
1090 &mut data.pit, in write_and_read_least()
1095 write_counter(&mut data.pit, 0, 0x3424, CommandAccess::CommandRWLeast); in write_and_read_least()
1096 read_counter(&mut data.pit, 0, 0x0024, CommandAccess::CommandRWLeast); in write_and_read_least()
1098 &mut data.pit, in write_and_read_least()
1102 read_counter(&mut data.pit, 0, 0x0024, CommandAccess::CommandRWLeast); in write_and_read_least()
1110 &mut data.pit, in write_and_read_most()
1115 write_counter(&mut data.pit, 0, 0x3424, CommandAccess::CommandRWMost); in write_and_read_most()
1116 read_counter(&mut data.pit, 0, 0x3400, CommandAccess::CommandRWMost); in write_and_read_most()
1118 &mut data.pit, in write_and_read_most()
1122 read_counter(&mut data.pit, 0, 0x3400, CommandAccess::CommandRWMost); in write_and_read_most()
1130 data.pit in read_command()
1140 &mut data.pit, in test_timed_latch()
1145 write_counter(&mut data.pit, 0, 0xffff, CommandAccess::CommandRWBoth); in test_timed_latch()
1147 &mut data.pit, in test_timed_latch()
1153 &mut data.pit, in test_timed_latch()
1156 read_counter(&mut data.pit, 0, 0xffff, CommandAccess::CommandRWBoth); in test_timed_latch()
1159 &mut data.pit, in test_timed_latch()
1163 &mut data.pit, in test_timed_latch()
1175 &mut data.pit, in interrupt_mode()
1180 write_counter(&mut data.pit, 0, 0xffff, CommandAccess::CommandRWBoth); in interrupt_mode()
1192 &mut data.pit, in rate_gen_mode()
1197 write_counter(&mut data.pit, 0, 0xffff, CommandAccess::CommandRWBoth); in rate_gen_mode()
1216 &mut data.pit, in square_wave_counter_read()
1221 write_counter(&mut data.pit, 0, 0xffff, CommandAccess::CommandRWBoth); in square_wave_counter_read()
1225 &mut data.pit, in square_wave_counter_read()
1237 &mut data.pit, in rate_gen_counter_read()
1242 write_counter(&mut data.pit, 0, 0xffff, CommandAccess::CommandRWBoth); in rate_gen_counter_read()
1246 &mut data.pit, in rate_gen_counter_read()
1258 &mut data.pit, in interrupt_counter_read()
1263 write_counter(&mut data.pit, 0, 0xffff, CommandAccess::CommandRWBoth); in interrupt_counter_read()
1267 &mut data.pit, in interrupt_counter_read()
1274 read_counter(&mut data.pit, 0, 0, CommandAccess::CommandRWBoth); in interrupt_counter_read()
1282 &mut data.pit, in read_back_count_access_low()
1287 write_counter(&mut data.pit, 0, 0xffff, CommandAccess::CommandRWLeast); in read_back_count_access_low()
1289 &mut data.pit, in read_back_count_access_low()
1298 &mut data.pit, in read_back_count_access_low()
1303 read_counter(&mut data.pit, 0, 0x00ff, CommandAccess::CommandRWLeast); in read_back_count_access_low()
1305 &mut data.pit, in read_back_count_access_low()
1311 &mut data.pit, in read_back_count_access_low()
1323 &mut data.pit, in read_back_count_access_high()
1328 write_counter(&mut data.pit, 0, 0xffff, CommandAccess::CommandRWLeast); in read_back_count_access_high()
1330 &mut data.pit, in read_back_count_access_high()
1339 &mut data.pit, in read_back_count_access_high()
1344 read_counter(&mut data.pit, 0, 0xff00, CommandAccess::CommandRWMost); in read_back_count_access_high()
1346 &mut data.pit, in read_back_count_access_high()
1352 &mut data.pit, in read_back_count_access_high()
1364 &mut data.pit, in read_back_status()
1369 write_counter(&mut data.pit, 0, 0xffff, CommandAccess::CommandRWBoth); in read_back_status()
1371 &mut data.pit, in read_back_status()
1378 &mut data.pit, in read_back_status()
1389 &mut data.pit, in speaker_square_wave()
1394 write_counter(&mut data.pit, 2, 0xffff, CommandAccess::CommandRWBoth); in speaker_square_wave()
1398 &mut data.pit, in speaker_square_wave()
1409 &mut data.pit, in speaker_rate_gen()
1414 write_counter(&mut data.pit, 2, 0xffff, CommandAccess::CommandRWBoth); in speaker_rate_gen()
1419 read_counter(&mut data.pit, 2, 0xffff - 128, CommandAccess::CommandRWBoth); in speaker_rate_gen()
1421 write_speaker(&mut data.pit, 0x1); in speaker_rate_gen()
1423 read_counter(&mut data.pit, 2, 0xffff - 128, CommandAccess::CommandRWBoth); in speaker_rate_gen()
1431 &mut data.pit, in speaker_interrupt()
1436 write_counter(&mut data.pit, 2, 0xffff, CommandAccess::CommandRWBoth); in speaker_interrupt()
1441 read_counter(&mut data.pit, 2, 0xffff - 128, CommandAccess::CommandRWBoth); in speaker_interrupt()
1443 write_speaker(&mut data.pit, 0x1); in speaker_interrupt()
1445 read_counter(&mut data.pit, 2, 0xffff - 256, CommandAccess::CommandRWBoth); in speaker_interrupt()
1452 data.pit.write( in invalid_write_and_read()
1460 data.pit.read( in invalid_write_and_read()