Skip to content

Commit 03dfe5f

Browse files
Sanggyu Leeyichoi
authored andcommitted
Update API Reference on limitation on NuttX (#996)
We've found API limitations on NuttX. It will provide the information on API reference. Also, I update Nuttx and nuttx to NuttX. IoT.js-DCO-1.0-Signed-off-by: Sanggyu Lee [email protected]
1 parent 3607c28 commit 03dfe5f

18 files changed

+41
-30
lines changed

docs/api/IoT.js-API-ADC.md

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

33
The following table shows ADC module APIs available for each platform.
44

5-
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
5+
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
66
| :---: | :---: | :---: | :---: |
77
| adc.open | O | O | O |
88
| adcpin.read | O | O | O |
@@ -17,7 +17,7 @@ This class allows reading analogue data from hardware pins.
1717

1818
The hardware pins can be read from or written to, therefore they are called bidirectional IO pins. This module provides the reading part.
1919

20-
On Nuttx, you have to know the number of pins that is defined on the target board module. For more information, please see the list below.
20+
On NuttX, you have to know the number of pins that is defined on the target board module. For more information, please see the list below.
2121
* [STM32F4-discovery](../targets/nuttx/stm32f4dis/IoT.js-API-Stm32f4dis.md#adc-pin)
2222

2323

@@ -29,7 +29,7 @@ Returns a new ADC object which can open an ADC pin.
2929
### adc.open(configuration[, callback])
3030
* `configuration` {Object}
3131
* `device` {string} mandatory configuration on Linux
32-
* `pin` {int} mandatory configuration on Nuttx
32+
* `pin` {int} mandatory configuration on NuttX
3333
* `callback` {Function}
3434
* `err`: {Error|null}
3535
* Returns: `AdcPin` {adc.AdcPin}

docs/api/IoT.js-API-Assert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The following shows Assert module APIs available for each platform.
44

5-
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
5+
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
66
| :---: | :---: | :---: | :---: |
77
| assert.assert | O | O | O |
88
| assert.doesNotThrow | O | O | O |

docs/api/IoT.js-API-BLE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The following shows ble module APIs available for each platform.
44

5-
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
5+
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
66
| :---: | :---: | :---: | :---: |
77
| ble.startAdvertising | O | O | X |
88
| ble.stopAdvertising | O | O | X |

docs/api/IoT.js-API-Buffer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The following shows Buffer module APIs available for each platform.
44

5-
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
5+
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
66
| :---: | :---: | :---: | :---: |
77
| buf.compare | O | O | O |
88
| buf.copy | O | O | O |

docs/api/IoT.js-API-DGRAM.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The following shows dgram module APIs available for each platform.
44

5-
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
5+
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
66
| :---: | :---: | :---: | :---: |
77
| dgram.createSocket | O | O | O |
88
| dgram.Socket.addMembership | O | O | X |
@@ -16,6 +16,8 @@ The following shows dgram module APIs available for each platform.
1616
| dgram.Socket.setMulticastTTL | X | X | X |
1717
| dgram.Socket.setTTL | O | O | X |
1818

19+
※ On NuttX/STM32F4-Discovery, even a couple of sockets/server/requests might not work properly.
20+
1921
# Dgram
2022

2123
The dgram module provides an implementation of UDP Datagram sockets.

docs/api/IoT.js-API-DNS.md

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

33
The following shows dns module APIs available for each platform.
44

5-
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
5+
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
66
| :---: | :---: | :---: | :---: |
77
| dns.lookup | O | O | X |
88

@@ -75,5 +75,5 @@ dns.lookup ('iotjs.net', options, function(err, ip, family) {
7575

7676
The current implementation only supports host name resolution to IPv4 addresses.
7777

78-
On Nuttx currently only valid IPv4 addresses are allowed for the
78+
On NuttX currently only valid IPv4 addresses are allowed for the
7979
[`dns.lookup()`](#dnslookuphostname-options-callback) method.

docs/api/IoT.js-API-Events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The following shows Event module APIs available for each platform.
44

5-
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
5+
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
66
| :---: | :---: | :---: | :---: |
77
| emitter.addListener | O | O | O |
88
| emitter.on | O | O | O |

docs/api/IoT.js-API-GPIO.md

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

33
The following shows GPIO module APIs available for each platform.
44

5-
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
5+
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
66
| :---: | :---: | :---: | :---: |
77
| gpio.open | O | O | O |
88
| gpiopin.write | O | O | O |
@@ -23,7 +23,7 @@ The logical number might be different from the physical
2323
pin number of the board. The mapping is available
2424
in the documentation of a given board.
2525

26-
On Nuttx, the pin number is defined in target board
26+
On NuttX, the pin number is defined in target board
2727
module. For more information, please check the
2828
following list:
2929
[STM32F4-discovery](../targets/nuttx/stm32f4dis/IoT.js-API-Stm32f4dis.md#gpio-pin)

docs/api/IoT.js-API-HTTP.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
The following shows Http module APIs available for each platform.
44

5-
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
5+
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
66
| :---: | :---: | :---: | :---: |
77
| http.createServer | O | O | O |
88
| http.request | O | O | O |
99
| http.get | O | O | O |
1010

11+
※ On NuttX/STM32F4-Discovery, even a couple of sockets/server/requests might not work properly.
1112

1213
# Http
1314

docs/api/IoT.js-API-Net.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The following shows net module APIs available for each platform.
44

5-
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
5+
| | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | NuttX<br/>(STM32F4-Discovery) |
66
| :---: | :---: | :---: | :---: |
77
| net.createServer | O | O | O |
88
| net.connect | O | O | O |
@@ -19,7 +19,9 @@ The following shows net module APIs available for each platform.
1919
| net.Socket.setKeepAlive | X | X | X |
2020

2121
※ When writable stream is finished but readable stream is still alive, IoT.js tries to shutdown the socket, not destroy.
22-
However on `nuttx` due to lack of implementation, it does nothing inside.
22+
However on `NuttX` due to lack of implementation, it does nothing inside.
23+
24+
※ On NuttX/STM32F4-Discovery, even a couple of sockets/server/requests might not work properly.
2325

2426
# Net
2527

@@ -857,4 +859,4 @@ socket.on('timeout', function() {
857859
socket.destroy();
858860
});
859861

860-
```
862+
```

0 commit comments

Comments
 (0)