Commit cb280883 authored by Marcel Stör's avatar Marcel Stör
Browse files

Fix Markdown syntax issues, fixes #2347

parent 085f35da
...@@ -6,7 +6,7 @@ Works: ...@@ -6,7 +6,7 @@ Works:
- entering the chip's to shutdown mode (350uA -> 5uA power consumption) - entering the chip's to shutdown mode (350uA -> 5uA power consumption)
- waking up the chip from shutdown - waking up the chip from shutdown
##Require ## Require
```lua ```lua
LM92 = require("lm92") LM92 = require("lm92")
``` ```
...@@ -16,19 +16,19 @@ LM92 = nil ...@@ -16,19 +16,19 @@ LM92 = nil
package.loaded["lm92"]=nil package.loaded["lm92"]=nil
``` ```
##setup() ## setup()
####Description #### Description
Setting the address for lm92. Setting the address for lm92.
####Syntax #### Syntax
setup(sda, scl, address) setup(sda, scl, address)
####Parameters #### Parameters
address: 0x48~0x4b, i2c address (depends on tha A0~A1 pins) address: 0x48~0x4b, i2c address (depends on tha A0~A1 pins)
####Returns #### Returns
nil nil
####Example #### Example
```lua ```lua
LM92 = require("lm92") LM92 = require("lm92")
gpio0 = 3 gpio0 = 3
...@@ -39,126 +39,126 @@ addr = 0x48 ...@@ -39,126 +39,126 @@ addr = 0x48
i2c.setup(0, sda, scl, i2c.SLOW) -- call i2c.setup() only once i2c.setup(0, sda, scl, i2c.SLOW) -- call i2c.setup() only once
LM92.setup(addr) LM92.setup(addr)
``` ```
##getTemperature() ## getTemperature()
####Description #### Description
Returns the temperature register's content. Returns the temperature register's content.
####Syntax #### Syntax
getTemperature() getTemperature()
####Parameters #### Parameters
- -
####Returns #### Returns
Temperature in degree Celsius. Temperature in degree Celsius.
####Example #### Example
```lua ```lua
t = LM92.getTemperature() t = LM92.getTemperature()
print("Got temperature: "..t.." C") print("Got temperature: "..t.." C")
``` ```
##wakeup() ## wakeup()
####Description #### Description
Makes the chip exit the low power shutdown mode. Makes the chip exit the low power shutdown mode.
####Syntax #### Syntax
wakeup() wakeup()
####Parameters #### Parameters
- -
####Returns #### Returns
- -
####Example #### Example
```lua ```lua
LM92.wakeup() LM92.wakeup()
tmr.delay( 1 * 1000 * 1000 ) tmr.delay( 1 * 1000 * 1000 )
``` ```
##shutdown() ## shutdown()
####Description #### Description
Makes the chip enter the low power shutdown mode. Makes the chip enter the low power shutdown mode.
####Syntax #### Syntax
shutdown() shutdown()
####Parameters #### Parameters
- -
####Returns #### Returns
- -
####Example #### Example
```lua ```lua
LM92.shutdown() LM92.shutdown()
``` ```
##setThyst() ## setThyst()
####Description #### Description
Set hysteresis Temperature. Set hysteresis Temperature.
####Syntax #### Syntax
setThyst(data_wr) setThyst(data_wr)
####Parameters #### Parameters
data_wr: 130~-55 ºC, hysteresis Temperature data_wr: 130~-55 ºC, hysteresis Temperature
####Returns #### Returns
nil nil
####Example #### Example
```lua ```lua
LM92.setThyst(3) LM92.setThyst(3)
``` ```
##setTcrit() ## setTcrit()
####Description #### Description
Set Critical Temperature. Set Critical Temperature.
####Syntax #### Syntax
setTcrit(data_wr) setTcrit(data_wr)
####Parameters #### Parameters
data_wr: 130~-55 ºC, Critical Temperature data_wr: 130~-55 ºC, Critical Temperature
####Returns #### Returns
nil nil
####Example #### Example
```lua ```lua
LM92.setTcrit(100.625) LM92.setTcrit(100.625)
``` ```
##setTlow() ## setTlow()
####Description #### Description
Set Low Window Temperature. Set Low Window Temperature.
####Syntax #### Syntax
setTlow(data_wr) setTlow(data_wr)
####Parameters ####Parameters
data_wr: 130~-55 ºC, Low Window Temperature data_wr: 130~-55 ºC, Low Window Temperature
####Returns #### Returns
nil nil
####Example #### Example
```lua ```lua
LM92.setTlow(32.25) LM92.setTlow(32.25)
``` ```
##setThigh() ## setThigh()
####Description ####Description
Set High Window Temperature. Set High Window Temperature.
####Syntax #### Syntax
setThigh(data_wr) setThigh(data_wr)
####Parameters #### Parameters
data_wr: 130~-55 ºC, High Window Temperature data_wr: 130~-55 ºC, High Window Temperature
####Returns #### Returns
nil nil
####Example ####Example
...@@ -166,83 +166,84 @@ nil ...@@ -166,83 +166,84 @@ nil
LM92.setThigh(27.5) LM92.setThigh(27.5)
``` ```
##getThyst() ## getThyst()
####Description #### Description
Get hysteresis Temperature. Get hysteresis Temperature.
####Syntax #### Syntax
getThyst() getThyst()
####Parameters #### Parameters
-- --
####Returns #### Returns
Hysteresis Temperature in degree Celsius. Hysteresis Temperature in degree Celsius.
####Example #### Example
```lua ```lua
t = LM92.getThyst() t = LM92.getThyst()
print("Got hysteresis temperature: "..t.." C") print("Got hysteresis temperature: "..t.." C")
``` ```
##getTcrit() ## getTcrit()
####Description #### Description
Get Critical Temperature. Get Critical Temperature.
####Syntax #### Syntax
getTcrit() getTcrit()
####Parameters #### Parameters
-- --
####Returns #### Returns
Critical Temperature in degree Celsius. Critical Temperature in degree Celsius.
####Example #### Example
```lua ```lua
t = LM92.getTcrit() t = LM92.getTcrit()
print("Got Critical temperature: "..t.." C") print("Got Critical temperature: "..t.." C")
``` ```
##getTlow() ## getTlow()
####Description #### Description
Get Low Window Temperature. Get Low Window Temperature.
####Syntax #### Syntax
getTlow() getTlow()
####Parameters #### Parameters
-- --
####Returns #### Returns
Low Window Temperature in degree Celsius. Low Window Temperature in degree Celsius.
####Example #### Example
```lua ```lua
t = LM92.getTlow() t = LM92.getTlow()
print("Got Low Window temperature: "..t.." C") print("Got Low Window temperature: "..t.." C")
``` ```
##getThigh() ## getThigh()
####Description #### Description
Get High Window Temperature. Get High Window Temperature.
####Syntax #### Syntax
getThigh() getThigh()
####Parameters #### Parameters
-- --
####Returns #### Returns
High Window Temperature in degree Celsius. High Window Temperature in degree Celsius.
####Example #### Example
```lua ```lua
t = LM92.getThigh() t = LM92.getThigh()
print("Got High Window temperature: "..t.." C") print("Got High Window temperature: "..t.." C")
``` ```
##Full example ## Full example
```lua
--node.compile("lm92.lua") --node.compile("lm92.lua")
LM92 = require("lm92") LM92 = require("lm92")
gpio0 = 3 gpio0 = 3
...@@ -270,6 +271,7 @@ t = LM92.getTlow() ...@@ -270,6 +271,7 @@ t = LM92.getTlow()
print("Got Low: "..t.." C") print("Got Low: "..t.." C")
t = LM92.getThigh() t = LM92.getThigh()
print("Got High: "..t.." C") print("Got High: "..t.." C")
```
#### TODO: #### TODO:
- add full support of the features, including interrupt and critical alert support - add full support of the features, including interrupt and critical alert support
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment