node-red-contrib-periph-memory 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,13 +21,13 @@ npm install node-red-contrib-periph-memory
21
21
  | `24aa02uid-device` | config | I²C bus and address for a 24AA02UID |
22
22
  | `24aa02uid` | input | Reads the factory-programmed 32-bit unique serial number from a 24AA02UID EEPROM, or reads / writes user EEPROM bytes, over I²C. |
23
23
  | `at24c02n-device` | config | I²C bus and address for an AT24C02N |
24
- | `periph-at24c02n` | input | Reads, writes and fills the 256 B EEPROM of an AT24C02N over I²C. Writes are split at 8-byte page boundaries and ACK-polled until each write cycle (5 ms max) has finished. |
24
+ | `at24c02n` | input | Reads, writes and fills the 256 B EEPROM of an AT24C02N over I²C. Writes are split at 8-byte page boundaries and ACK-polled until each write cycle (5 ms max) has finished. |
25
25
  | `at24c64-device` | config | I²C bus and address for an AT24C64 |
26
- | `periph-at24c64` | input | Reads, writes and fills the 8 KiB EEPROM of an AT24C64 over I²C. Writes are split at 32-byte page boundaries and ACK-polled until each write cycle (10 ms max (20 ms at 1.8 V)) has finished. |
26
+ | `at24c64` | input | Reads, writes and fills the 8 KiB EEPROM of an AT24C64 over I²C. Writes are split at 32-byte page boundaries and ACK-polled until each write cycle (10 ms max (20 ms at 1.8 V)) has finished. |
27
27
  | `cat24c512-device` | config | I²C bus and address for a CAT24C512 |
28
- | `periph-cat24c512` | input | Reads, writes and fills the 64 KiB EEPROM of a CAT24C512 over I²C. Writes are split at 128-byte page boundaries and ACK-polled until each write cycle (5 ms max) has finished. |
28
+ | `cat24c512` | input | Reads, writes and fills the 64 KiB EEPROM of a CAT24C512 over I²C. Writes are split at 128-byte page boundaries and ACK-polled until each write cycle (5 ms max) has finished. |
29
29
  | `mb85rc-device` | config | I²C bus and address for a MB85RC |
30
- | `periph-mb85rc` | input | Reads, writes and fills the 32 KiB non-volatile FRAM of an MB85RC256V over I²C. FRAM writes complete at bus speed — no write delay, no page limit. |
30
+ | `mb85rc` | input | Reads, writes and fills the 32 KiB non-volatile FRAM of an MB85RC256V over I²C. FRAM writes complete at bus speed — no write delay, no page limit. |
31
31
  | `mx25l12845e-device` | config | Bus configuration for a MX25L12845E |
32
32
  | `mx25l12845e` | input | Reads, writes and erases the 16 MiB Macronix MX25L12845E SPI NOR flash by byte address. Writes are erase-aware: the node erases a 4 KiB sector itself when bits must go from 0 to 1, and keeps the other bytes of that sector. There is no filesystem. |
33
33
  | `sd-spi-device` | config | Bus configuration for a SD-SPI |
@@ -4,7 +4,7 @@
4
4
  "type": "tab",
5
5
  "label": "AT24C02N Boot Counter",
6
6
  "disabled": false,
7
- "info": "Demonstrates non-volatile EEPROM state. Every 5 seconds a function node reads a 4-byte big-endian counter at address 0x0000 through periph-at24c02n, increments it and writes it back (page-split and ACK-polled by the driver). The Debug node shows the counter, which survives a Node-RED restart or power loss."
7
+ "info": "Demonstrates non-volatile EEPROM state. Every 5 seconds a function node reads a 4-byte big-endian counter at address 0x0000 through at24c02n, increments it and writes it back (page-split and ACK-polled by the driver). The Debug node shows the counter, which survives a Node-RED restart or power loss."
8
8
  },
9
9
  {
10
10
  "id": "cfg-at24c02n",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  {
33
33
  "id": "rd",
34
- "type": "periph-at24c02n",
34
+ "type": "at24c02n",
35
35
  "name": "Read counter",
36
36
  "device": "cfg-at24c02n",
37
37
  "z": "tab-at24c02n-demo",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  {
54
54
  "id": "wr",
55
- "type": "periph-at24c02n",
55
+ "type": "at24c02n",
56
56
  "name": "Write counter",
57
57
  "device": "cfg-at24c02n",
58
58
  "z": "tab-at24c02n-demo",
@@ -4,7 +4,7 @@
4
4
  "type": "tab",
5
5
  "label": "AT24C64 Boot Counter",
6
6
  "disabled": false,
7
- "info": "Demonstrates non-volatile EEPROM state. Every 5 seconds a function node reads a 4-byte big-endian counter at address 0x0000 through periph-at24c64, increments it and writes it back (page-split and ACK-polled by the driver). The Debug node shows the counter, which survives a Node-RED restart or power loss."
7
+ "info": "Demonstrates non-volatile EEPROM state. Every 5 seconds a function node reads a 4-byte big-endian counter at address 0x0000 through at24c64, increments it and writes it back (page-split and ACK-polled by the driver). The Debug node shows the counter, which survives a Node-RED restart or power loss."
8
8
  },
9
9
  {
10
10
  "id": "cfg-at24c64",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  {
33
33
  "id": "rd",
34
- "type": "periph-at24c64",
34
+ "type": "at24c64",
35
35
  "name": "Read counter",
36
36
  "device": "cfg-at24c64",
37
37
  "z": "tab-at24c64-demo",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  {
54
54
  "id": "wr",
55
- "type": "periph-at24c64",
55
+ "type": "at24c64",
56
56
  "name": "Write counter",
57
57
  "device": "cfg-at24c64",
58
58
  "z": "tab-at24c64-demo",
@@ -4,7 +4,7 @@
4
4
  "type": "tab",
5
5
  "label": "CAT24C512 Boot Counter",
6
6
  "disabled": false,
7
- "info": "Demonstrates non-volatile EEPROM state. Every 5 seconds a function node reads a 4-byte big-endian counter at address 0x0000 through periph-cat24c512, increments it and writes it back (page-split and ACK-polled by the driver). The Debug node shows the counter, which survives a Node-RED restart or power loss."
7
+ "info": "Demonstrates non-volatile EEPROM state. Every 5 seconds a function node reads a 4-byte big-endian counter at address 0x0000 through cat24c512, increments it and writes it back (page-split and ACK-polled by the driver). The Debug node shows the counter, which survives a Node-RED restart or power loss."
8
8
  },
9
9
  {
10
10
  "id": "cfg-cat24c512",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  {
33
33
  "id": "rd",
34
- "type": "periph-cat24c512",
34
+ "type": "cat24c512",
35
35
  "name": "Read counter",
36
36
  "device": "cfg-cat24c512",
37
37
  "z": "tab-cat24c512-demo",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  {
54
54
  "id": "wr",
55
- "type": "periph-cat24c512",
55
+ "type": "cat24c512",
56
56
  "name": "Write counter",
57
57
  "device": "cfg-cat24c512",
58
58
  "z": "tab-cat24c512-demo",
@@ -4,7 +4,7 @@
4
4
  "type": "tab",
5
5
  "label": "MB85RC Boot Counter",
6
6
  "disabled": false,
7
- "info": "Demonstrates non-volatile FRAM state. Every 5 seconds a function node reads a 4-byte big-endian counter at address 0x0000 through periph-mb85rc, increments it and writes it back (no write delay needed). The Debug node shows the counter, which survives a Node-RED restart or power loss."
7
+ "info": "Demonstrates non-volatile FRAM state. Every 5 seconds a function node reads a 4-byte big-endian counter at address 0x0000 through mb85rc, increments it and writes it back (no write delay needed). The Debug node shows the counter, which survives a Node-RED restart or power loss."
8
8
  },
9
9
  {
10
10
  "id": "cfg-mb85rc",
@@ -31,7 +31,7 @@
31
31
  },
32
32
  {
33
33
  "id": "rd",
34
- "type": "periph-mb85rc",
34
+ "type": "mb85rc",
35
35
  "name": "Read counter",
36
36
  "device": "cfg-mb85rc",
37
37
  "z": "tab-mb85rc-demo",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  {
54
54
  "id": "wr",
55
- "type": "periph-mb85rc",
55
+ "type": "mb85rc",
56
56
  "name": "Write counter",
57
57
  "device": "cfg-mb85rc",
58
58
  "z": "tab-mb85rc-demo",
@@ -30,7 +30,7 @@
30
30
 
31
31
  <!-- EEPROM node: trigger → read / write / fill -->
32
32
  <script type="text/javascript">
33
- RED.nodes.registerType('periph-at24c02n', {
33
+ RED.nodes.registerType('at24c02n', {
34
34
  category: 'Peripheral',
35
35
  color: '#C084FC',
36
36
  defaults: {
@@ -45,7 +45,7 @@
45
45
  });
46
46
  </script>
47
47
 
48
- <script type="text/html" data-template-name="periph-at24c02n">
48
+ <script type="text/html" data-template-name="at24c02n">
49
49
  <div class="form-row">
50
50
  <label for="node-input-device"><i class="fa fa-microchip"></i> Device</label>
51
51
  <input type="text" id="node-input-device">
@@ -56,7 +56,7 @@
56
56
  </div>
57
57
  </script>
58
58
 
59
- <script type="text/html" data-help-name="periph-at24c02n">
59
+ <script type="text/html" data-help-name="at24c02n">
60
60
  <p>Reads, writes and fills the 256 B EEPROM of an AT24C02N over I²C. Writes are split at
61
61
  8-byte page boundaries and ACK-polled until each write cycle (5 ms max) has finished.</p>
62
62
  <p>The device is configured via an <b>at24c02n-device</b> config node.</p>
@@ -58,5 +58,5 @@ module.exports = function(RED) {
58
58
  }
59
59
  });
60
60
  }
61
- RED.nodes.registerType('periph-at24c02n', AT24C02NNode);
61
+ RED.nodes.registerType('at24c02n', AT24C02NNode);
62
62
  };
@@ -30,7 +30,7 @@
30
30
 
31
31
  <!-- EEPROM node: trigger → read / write / fill -->
32
32
  <script type="text/javascript">
33
- RED.nodes.registerType('periph-at24c64', {
33
+ RED.nodes.registerType('at24c64', {
34
34
  category: 'Peripheral',
35
35
  color: '#C084FC',
36
36
  defaults: {
@@ -45,7 +45,7 @@
45
45
  });
46
46
  </script>
47
47
 
48
- <script type="text/html" data-template-name="periph-at24c64">
48
+ <script type="text/html" data-template-name="at24c64">
49
49
  <div class="form-row">
50
50
  <label for="node-input-device"><i class="fa fa-microchip"></i> Device</label>
51
51
  <input type="text" id="node-input-device">
@@ -56,7 +56,7 @@
56
56
  </div>
57
57
  </script>
58
58
 
59
- <script type="text/html" data-help-name="periph-at24c64">
59
+ <script type="text/html" data-help-name="at24c64">
60
60
  <p>Reads, writes and fills the 8 KiB EEPROM of an AT24C64 over I²C. Writes are split at
61
61
  32-byte page boundaries and ACK-polled until each write cycle (10 ms max (20 ms at 1.8 V)) has finished.</p>
62
62
  <p>The device is configured via an <b>at24c64-device</b> config node.</p>
@@ -58,5 +58,5 @@ module.exports = function(RED) {
58
58
  }
59
59
  });
60
60
  }
61
- RED.nodes.registerType('periph-at24c64', AT24C64Node);
61
+ RED.nodes.registerType('at24c64', AT24C64Node);
62
62
  };
@@ -30,7 +30,7 @@
30
30
 
31
31
  <!-- EEPROM node: trigger → read / write / fill -->
32
32
  <script type="text/javascript">
33
- RED.nodes.registerType('periph-cat24c512', {
33
+ RED.nodes.registerType('cat24c512', {
34
34
  category: 'Peripheral',
35
35
  color: '#C084FC',
36
36
  defaults: {
@@ -45,7 +45,7 @@
45
45
  });
46
46
  </script>
47
47
 
48
- <script type="text/html" data-template-name="periph-cat24c512">
48
+ <script type="text/html" data-template-name="cat24c512">
49
49
  <div class="form-row">
50
50
  <label for="node-input-device"><i class="fa fa-microchip"></i> Device</label>
51
51
  <input type="text" id="node-input-device">
@@ -56,7 +56,7 @@
56
56
  </div>
57
57
  </script>
58
58
 
59
- <script type="text/html" data-help-name="periph-cat24c512">
59
+ <script type="text/html" data-help-name="cat24c512">
60
60
  <p>Reads, writes and fills the 64 KiB EEPROM of a CAT24C512 over I²C. Writes are split at
61
61
  128-byte page boundaries and ACK-polled until each write cycle (5 ms max) has finished.</p>
62
62
  <p>The device is configured via an <b>cat24c512-device</b> config node.</p>
@@ -58,5 +58,5 @@ module.exports = function(RED) {
58
58
  }
59
59
  });
60
60
  }
61
- RED.nodes.registerType('periph-cat24c512', CAT24C512Node);
61
+ RED.nodes.registerType('cat24c512', CAT24C512Node);
62
62
  };
@@ -30,7 +30,7 @@
30
30
 
31
31
  <!-- FRAM node: trigger → read / write / fill -->
32
32
  <script type="text/javascript">
33
- RED.nodes.registerType('periph-mb85rc', {
33
+ RED.nodes.registerType('mb85rc', {
34
34
  category: 'Peripheral',
35
35
  color: '#C084FC',
36
36
  defaults: {
@@ -45,7 +45,7 @@
45
45
  });
46
46
  </script>
47
47
 
48
- <script type="text/html" data-template-name="periph-mb85rc">
48
+ <script type="text/html" data-template-name="mb85rc">
49
49
  <div class="form-row">
50
50
  <label for="node-input-device"><i class="fa fa-microchip"></i> Device</label>
51
51
  <input type="text" id="node-input-device">
@@ -56,7 +56,7 @@
56
56
  </div>
57
57
  </script>
58
58
 
59
- <script type="text/html" data-help-name="periph-mb85rc">
59
+ <script type="text/html" data-help-name="mb85rc">
60
60
  <p>Reads, writes and fills the 32 KiB non-volatile FRAM of an MB85RC256V over I²C.
61
61
  FRAM writes complete at bus speed — no write delay, no page limit.</p>
62
62
  <p>The device is configured via an <b>mb85rc-device</b> config node.</p>
@@ -58,5 +58,5 @@ module.exports = function(RED) {
58
58
  }
59
59
  });
60
60
  }
61
- RED.nodes.registerType('periph-mb85rc', MB85RCNode);
61
+ RED.nodes.registerType('mb85rc', MB85RCNode);
62
62
  };
@@ -46,7 +46,7 @@
46
46
  outputs: 1,
47
47
  icon: 'font-awesome/fa-hdd-o',
48
48
  label: function() { return this.name || 'MX25L12845E'; },
49
- paletteLabel: 'MX25L12845E (NOR flash)'
49
+ paletteLabel: 'MX25L12845E'
50
50
  });
51
51
  </script>
52
52
 
@@ -11,7 +11,7 @@
11
11
  speed: { value: '12000000', required: true, validate: RED.validators.number() }
12
12
  },
13
13
  label: function() {
14
- return this.name || ('SD card @ spidev' + this.bus + '.' + this.device);
14
+ return this.name || ('SD-SPI @ spidev' + this.bus + '.' + this.device);
15
15
  }
16
16
  });
17
17
  </script>
@@ -55,8 +55,8 @@
55
55
  inputs: 1,
56
56
  outputs: 1,
57
57
  icon: 'font-awesome/fa-hdd-o',
58
- label: function() { return this.name || 'SD card'; },
59
- paletteLabel: 'SD card (SPI)'
58
+ label: function() { return this.name || 'SD-SPI'; },
59
+ paletteLabel: 'SD-SPI'
60
60
  });
61
61
  </script>
62
62
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-periph-memory",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Node-RED nodes for memory chips",
5
5
  "keywords": [
6
6
  "node-red",
package/index.js DELETED
@@ -1,11 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- module.exports = function(RED) {
5
- const nodesDir = path.join(__dirname, 'nodes');
6
- if (!fs.existsSync(nodesDir)) return;
7
- fs.readdirSync(nodesDir).forEach(function(chip) {
8
- const nodeFile = path.join(nodesDir, chip, chip + '.js');
9
- if (fs.existsSync(nodeFile)) require(nodeFile)(RED);
10
- });
11
- };