Skip to content

Commit 0abeb74

Browse files
committed
Fix typos
1 parent f68a741 commit 0abeb74

12 files changed

Lines changed: 53 additions & 79 deletions

mruby_io_ADC_en.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# ADC
22

3-
- A class that supports Analog-to-Digital Conversion (`ADC`) functionality.
3+
- A class that supports Analog-to-Digital Conversion (ADC) functionality.
44
- Generally, it is capable of converting analog voltage values to digital values.
55

66
## Constructor
77

8-
---
98

109
### ADC.new( pin, *params )
1110

12-
- Generate an `ADC` object by specifying the physical pin indicated by "pin."
11+
- Generate an ADC object by specifying the physical pin indicated by "pin."
1312
- Typically, "pin" is specified as an integer, but alternative methods (e.g., "B1" in PIC) are also acceptable.
1413
- If the device has a switch between analog and digital modes for the pin, it will be switched to analog mode at this point.
1514
- Generally, there is no need to specify additional parameters, such as "params." However, for certain models that require additional feature specifications like sampling speed, they can be specified here.
@@ -24,7 +23,6 @@ adc1 = ADC.new( 1 )
2423

2524
## Instance Method
2625

27-
---
2826

2927
### read_voltage() -> Float
3028

mruby_io_ADC_ja.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
## コンストラクタ
99

10-
---
1110

1211
### ADC.new( pin, *params )
1312

@@ -26,7 +25,6 @@ adc1 = ADC.new( 1 )
2625

2726
## インスタンスメソッド
2827

29-
---
3028

3129
### read_voltage() -> Float
3230

mruby_io_GPIO_en.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@
77

88
## Class method
99

10-
---
1110

1211
### GPIO.setmode( pin, params ) -> nil
1312

14-
- Specify the physical pin indicated by "pin" and change the mode of the `GPIO`.
13+
- Specify the physical pin indicated by "pin" and change the mode of the GPIO.
1514
- Refer to the constructor for other information.
1615

1716
Example of use:
@@ -34,7 +33,7 @@ GPIO.setmode( "B1", GPIO::IN|GPIO::PULL_UP )
3433
Example of use:
3534

3635
```ruby
37-
GPIO.new( 1, GPIO::IN )
36+
GPIO.setmode( 1, GPIO::IN )
3837
v1 = GPIO.read_at( 1 ) # read from pin 1.
3938
```
4039

@@ -73,19 +72,18 @@ if GPIO.low_at?( 1 )
7372
Example of use:
7473

7574
```ruby
76-
GPIO.new( 1, GPIO::OUT )
77-
v1 = GPIO.write_at( 1, 0 ) # output zero to pin 1.
75+
GPIO.setmode( 1, GPIO::OUT )
76+
GPIO.write_at( 1, 0 ) # output zero to pin 1.
7877
```
7978

8079
---
8180

8281
## Constructor
8382

84-
---
8583

8684
### GPIO.new( pin, params )
8785

88-
- Specify the physical pin indicated by the pin and generate a `GPIO` object.
86+
- Specify the physical pin indicated by the pin and generate a GPIO object.
8987
- At the same time, specify a param to indicate the mode, such as input/output direction.
9088
- The pin is typically specified as an integer, but other methods (such as "B1" in PIC) may be used.
9189
- Although one bit is the basic unit, pin specification that combines multiple bits may be necessary depending on the device.
@@ -117,7 +115,6 @@ gpio1 = GPIO.new("B1", GPIO::IN|GPIO::PULL_UP)
117115

118116
## Instance methods
119117

120-
---
121118

122119
### read() -> Integer
123120

@@ -172,7 +169,7 @@ gpio1.write( 1 )
172169

173170
### setmode( param ) -> nil
174171

175-
- Change the `GPIO` mode at any timing.
172+
- Change the GPIO mode at any timing.
176173
- When IN, OUT, or HIGH_Z is specified while PULL_UP or other settings have already been set, the previous settings will be invalidated.
177174

178175
Example of use:

mruby_io_GPIO_ja.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
## クラスメソッド
99

10-
---
1110

1211
### GPIO.setmode( pin, params ) -> nil
1312

@@ -34,7 +33,7 @@ GPIO.setmode( "B1", GPIO::IN|GPIO::PULL_UP )
3433
使用例
3534

3635
```
37-
GPIO.new( 1, GPIO::IN )
36+
GPIO.setmode( 1, GPIO::IN )
3837
v1 = GPIO.read_at( 1 ) # read from pin 1.
3938
```
4039

@@ -73,15 +72,14 @@ if GPIO.low_at?( 1 )
7372
使用例
7473

7574
```
76-
GPIO.new( 1, GPIO::OUT )
77-
v1 = GPIO.write_at( 1, 0 ) # output zero to pin 1.
75+
GPIO.setmode( 1, GPIO::OUT )
76+
GPIO.write_at( 1, 0 ) # output zero to pin 1.
7877
```
7978

8079
---
8180

8281
## コンストラクタ
8382

84-
---
8583

8684
### GPIO.new( pin, params )
8785

@@ -117,7 +115,6 @@ gpio1 = GPIO.new( "B1", GPIO::IN|GPIO::PULL_UP )
117115

118116
## インスタンスメソッド
119117

120-
---
121118

122119
### read() -> Integer
123120

mruby_io_I2C_en.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
# I2C
22

3-
- A class that supports `I2C` bus.
3+
- A class that supports I2C bus.
44
- This specification supports only master devices with 7-bit addresses.
55

66
---
77

8-
## **Constructor**
8+
## Constructor
99

10-
---
1110

1211
### I2C.new( id=nil, *params )
1312

14-
- Generates an `I2C` object by specifying the physical unit indicated by "id."
13+
- Generates an I2C object by specifying the physical unit indicated by "id."
1514
- "id" can be omitted when there is only one physical unit.
1615

1716
Optional Parameters
@@ -39,16 +38,15 @@ Device-specific
3938

4039
---
4140

42-
## **Instance Methods**
41+
## Instance Methods
4342

44-
---
4543

4644
### read( i2c_adrs_7, read_bytes, *param ) -> String
4745

48-
- Reads data of **`read_bytes`** bytes from the device with the address **`i2c_adrs_7`**.
49-
- If the device returns NAK in the middle, a String of shorter length than **`read_bytes`** may be returned.
50-
- If data is specified in the **`param`**, it will be output before the repeated start, and then reading will start.
51-
- Output specifications are the same as for **`write()`**.
46+
- Reads data of read_bytes bytes from the device with the address i2c_adrs_7.
47+
- If the device returns NAK in the middle, a String of shorter length than read_bytes may be returned.
48+
- If data is specified in the param, it will be output before the repeated start, and then reading will start.
49+
- Output specifications are the same as for write().
5250

5351
Example of use:
5452

@@ -75,9 +73,9 @@ I2C bus sequence
7573

7674
### write( i2c_adrs_7 , *outputs ) -> Integer
7775

78-
- Writes data specified in **`outputs`** to the device with the address **`i2c_adrs_7`**.
76+
- Writes data specified in outputs to the device with the address i2c_adrs_7.
7977
- The number of bytes successfully written is returned as the return value.
80-
- **`outputs`** can be specified as an Integer, Array<Integer>, or String.
78+
- outputs can be specified as an Integer, Array<Integer>, or String.
8179

8280
Example of use:
8381

@@ -138,8 +136,8 @@ i2c.send_stop
138136

139137
### raw_read( read_bytes, ack_nack = false ) -> String
140138

141-
- Reads **`read_bytes`** bytes from the I2C bus and returns them.
142-
- **`ack_nack = true`** outputs ACK at the last byte reading, and **`false`** outputs NACK.
139+
- Reads read_bytes bytes from the I2C bus and returns them.
140+
- ack_nack = true outputs ACK at the last byte reading, and false outputs NACK.
143141

144142
Example of use:
145143

@@ -151,9 +149,9 @@ str = i2c.raw_read( 20 )
151149

152150
### raw_write( *outputs ) -> Integer
153151

154-
- Writes data specified in **`outputs`** to the I2C bus.
152+
- Writes data specified in outputs to the I2C bus.
155153
- The number of bytes successfully written is returned as the return value.
156-
- **`outputs`** can be specified as an Integer, Array<Integer>, or String.
154+
- outputs can be specified as an Integer, Array<Integer>, or String.
157155

158156
Example of use:
159157

mruby_io_I2C_ja.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
## コンストラクタ
99

10-
---
1110

1211
### I2C.new( id=nil, *params )
1312

@@ -41,7 +40,6 @@ i2c = I2C.new(1, frequency:400_000 ) # 400kHz
4140

4241
## インスタンスメソッド
4342

44-
---
4543

4644
### read( i2c_adrs_7, read_bytes, *param ) -> String
4745

mruby_io_PWM_en.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
# PWM
22

3-
- A class that supports Pulse Width Modulation (`PWM`) functionality.
3+
- A class that supports Pulse Width Modulation (PWM) functionality.
44

55
---
66

7-
## **Constructor**
7+
## Constructor
88

9-
---
109

1110
### PWM.new( pin, *params )
1211

1312
- Generate a PWM object by specifying the physical pin indicated by "pin."
1413
- Typically, "pin" is specified as an integer, but alternative methods (e.g., "B1" in PIC) are also acceptable.
15-
- When specifying the parameter **`frequency`**, the output starts with a duty cycle of 50%.
16-
- If you want to start the output with a duty cycle other than 50%, specify the parameter **`duty`** simultaneously.
14+
- When specifying the parameter frequency, the output starts with a duty cycle of 50%.
15+
- If you want to start the output with a duty cycle other than 50%, specify the parameter duty simultaneously.
1716

1817
Optional Parameters
1918

@@ -39,9 +38,8 @@ Device-specific
3938

4039
---
4140

42-
## **Instance Methods**
41+
## Instance Methods
4342

44-
---
4543

4644
### frequency( freq )
4745

mruby_io_PWM_ja.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
## コンストラクタ
88

9-
---
109

1110
### PWM.new( pin, *params )
1211

@@ -41,7 +40,6 @@ pwm1 = PWM.new( 1, frequency:440, duty:30 )
4140

4241
## インスタンスメソッド
4342

44-
---
4543

4644
### frequency( freq )
4745

mruby_io_SPI_en.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# SPI
22

3-
- A class that supports `SPI` bus.
3+
- A class that supports SPI bus.
44
- This specification defines only master devices and transfers in 8-bit units.
5-
- The Chip Select (CS/SS) will be managed using `GPIO` functionality and is not defined within the `SPI` class.
5+
- The Chip Select (CS/SS) will be managed using GPIO functionality and is not defined within the SPI class.
66

77
---
88

9-
## **Constructor**
9+
## Constructor
1010

11-
---
1211

1312
### SPI.new( id=nil, *params )
1413

15-
- Generates an `SPI` object by specifying the physical unit indicated by "id."
14+
- Generates an SPI object by specifying the physical unit indicated by "id."
1615
- "id" can be omitted when there is only one physical unit.
1716

1817
Optional Parameters
@@ -40,13 +39,12 @@ Device-specific
4039

4140
---
4241

43-
## **Instance Methods**
42+
## Instance Methods
4443

45-
---
4644

4745
### setmode( *params )
4846

49-
- Changes the operating mode (parameters) of the `SPI`.
47+
- Changes the operating mode (parameters) of the SPI.
5048
- The parameters are specified according to the constructor.
5149

5250
Example of use:
@@ -59,7 +57,7 @@ spi.setmode( mode:3 )
5957

6058
### read( read_bytes ) -> String
6159

62-
- Reads data of **`read_bytes`** bytes from the SPI bus.
60+
- Reads data of read_bytes bytes from the SPI bus.
6361
- At the same time, data will be output as 0.
6462

6563
Example of use:
@@ -72,8 +70,8 @@ data = spi.read( 32 )
7270

7371
### write( *outputs ) -> nil
7472

75-
- Outputs data specified in **`outputs`** to the SPI bus.
76-
- **`outputs`** can be specified as an Integer, Array<Integer>, or String.
73+
- Outputs data specified in outputs to the SPI bus.
74+
- outputs can be specified as an Integer, Array<Integer>, or String.
7775

7876
Example of use:
7977

@@ -87,9 +85,9 @@ i2c.write( 0x02, 0xee, 0xad, 0x00, data_string ) # useful for EEPROM
8785

8886
### transfer( outputs, additional_read_bytes = 0 ) -> String
8987

90-
- Outputs data specified in **`outputs`** to the SPI bus while simultaneously reading data (General-purpose transfer).
91-
- **`outputs`** can be specified as an Integer, Array<Integer>, or String.
92-
- If **`additional_read_bytes`** is specified, it will output 0x00 after the **`outputs`**.
88+
- Outputs data specified in outputs to the SPI bus while simultaneously reading data (General-purpose transfer).
89+
- outputs can be specified as an Integer, Array<Integer>, or String.
90+
- If additional_read_bytes is specified, it will output 0x00 after the outputs.
9391

9492
Example of use:
9593

mruby_io_SPI_ja.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
## コンストラクタ
1010

11-
---
1211

1312
### SPI.new( id=nil, *params )
1413

@@ -42,7 +41,6 @@ spi = SPI.new( unit:1, frequency:10_000_000 )
4241

4342
## インスタンスメソッド
4443

45-
---
4644

4745
### setmode( *params )
4846

0 commit comments

Comments
 (0)