Browse files

Rewording some comments.

  • Loading branch information...
1 parent 65641cb commit 8adc9cfa47b7cd1b42b190cd9232347e453cc4cc @kristopher committed Aug 20, 2009
Showing with 10 additions and 10 deletions.
  1. +10 −10 PS2Mouse.cpp
View
20 PS2Mouse.cpp
@@ -25,27 +25,27 @@ void PS2Mouse::initialize() {
delay(20);
write(0xff); // Send Reset to the mouse
read_byte(); // Read ack byte
- delay(20); // Not sure why this needs this delay
+ delay(20); // Not sure why this needs the delay
read_byte(); // blank
read_byte(); // blank
- delay(20); // Not sure why this needs this delay
+ delay(20); // Not sure why this needs the delay
if (_mode == REMOTE) {
set_remote_mode();
} else {
- enable_data_reporting(); // enable_data_reporting the mouse to send data.
+ enable_data_reporting(); // Tell the mouse to start sending data again
}
delayMicroseconds(100);
_initialized = 1;
}
void PS2Mouse::set_mode(int data) {
if (_mode == STREAM) {
- disable_data_reporting(); // Tell mouse to stop sending data.
+ disable_data_reporting(); // Tell the mouse to stop sending data.
}
- write(data); // Send Set Remote Mode
+ write(data); // Send Set Mode
read_byte(); // Read Ack byte
if (_mode == STREAM) {
- enable_data_reporting(); // Tell mouse to start sending data again
+ enable_data_reporting(); // Tell the mouse to start sending data again
}
if (_initialized) {
delayMicroseconds(100);
@@ -64,14 +64,14 @@ void PS2Mouse::set_stream_mode() {
void PS2Mouse::set_sample_rate(int rate) {
if (_mode == STREAM) {
- disable_data_reporting(); // Tell mouse to stop sending data.
+ disable_data_reporting(); // Tell the mouse to stop sending data.
}
write(0xf3); // Tell the mouse we are going to set the sample rate.
read_byte(); // Read Ack Byte
write(rate); // Send Set Sample Rate
read_byte(); // Read ack byte
if (_mode == STREAM) {
- enable_data_reporting(); // Tell mouse to start sending data again
+ enable_data_reporting(); // Tell the mouse to start sending data again
}
delayMicroseconds(100);
}
@@ -87,7 +87,7 @@ void PS2Mouse::set_scaling_1_1() {
// This only effects data reporting in Stream mode.
void PS2Mouse::enable_data_reporting() {
if (!_enabled) {
- write(0xf4); // Send enable_data_reporting data reporting
+ write(0xf4); // Send enable data reporting
read_byte(); // Read Ack Byte
_enabled = true;
}
@@ -96,7 +96,7 @@ void PS2Mouse::enable_data_reporting() {
// Disabling data reporting in Stream Mode will make it behave like Remote Mode
void PS2Mouse::disable_data_reporting() {
if (!_disabled) {
- write(0xf5); // Send disable_data_reporting data reporting
+ write(0xf5); // Send disable data reporting
read_byte(); // Read Ack Byte
_disabled = true;
}

0 comments on commit 8adc9cf

Please sign in to comment.