Skip to content
Snippets Groups Projects
Commit 3bd85919 authored by Neil Gershenfeld (test)'s avatar Neil Gershenfeld (test)
Browse files

wip

parent c9bd0788
No related branches found
No related tags found
No related merge requests found
Pipeline #24291 passed
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
// warranty is provided, and users accept all liability. // warranty is provided, and users accept all liability.
// //
#define digitalWriteFast(pin,val) gpio_put(pin, val ? 1 : 0) #define digitalWriteFast(pin,val) (val ? sio_hw->gpio_set = (1 << pin) : sio_hw->gpio_clr = (1 << pin))
#define digitalReadFast(pin) (gpio_get(pin) ? 1 : 0) #define digitalReadFast(pin) ((1 << pin) & sio_hw->gpio_in)
void setup() { void setup() {
// //
...@@ -39,27 +39,27 @@ void loop1() { ...@@ -39,27 +39,27 @@ void loop1() {
// //
uint32_t pin1 = (1 << 1); uint32_t pin1 = (1 << 1);
uint32_t pin2 = (1 << 2); uint32_t pin2 = (1 << 2);
/**/ /*
while (1) { while (1) {
if (pin1 & sio_hw->gpio_in) if (pin1 & sio_hw->gpio_in)
sio_hw->gpio_clr = pin2; sio_hw->gpio_clr = pin2;
else else
sio_hw->gpio_set = pin2; sio_hw->gpio_set = pin2;
} }
/**/ */
// //
// Arduino Fast version // Arduino Fast version
// 8.77 MHz at 250 MHz clock // 12.9 MHz at 250 MHz clock
// 8.16 MHz at 133 MHz clock // 9.17 MHz at 133 MHz clock
// //
/* /**/
while (1) { while (1) {
if (digitalReadFast(1)) if (digitalReadFast(1))
digitalWriteFast(2,LOW); digitalWriteFast(2,LOW);
else else
digitalWriteFast(2,HIGH); digitalWriteFast(2,HIGH);
} }
*/ /**/
// //
// Arduino version // Arduino version
// 1.11 MHz at 250 MHz clock // 1.11 MHz at 250 MHz clock
...@@ -74,4 +74,3 @@ void loop1() { ...@@ -74,4 +74,3 @@ void loop1() {
} }
*/ */
} }
...@@ -70,14 +70,7 @@ The GPIO test measures how quickly pins can communicate with a processor core; t ...@@ -70,14 +70,7 @@ The GPIO test measures how quickly pins can communicate with a processor core; t
<tr> <tr>
<td>12.9</td> <td>12.9</td>
<td>RP2040</td> <td>RP2040</td>
<td><a href=GPIO/RP2040/ring.RP2040.ino>Arduino, SIO, 250 MHz</a></td> <td><a href=GPIO/RP2040/ring.RP2040.ino>Arduino, SIO/Fast, 250 MHz</a></td>
<td>December 2022</td>
</tr>
<tr>
<td>8.77</td>
<td>RP2040</td>
<td><a href=GPIO/RP2040/ring.RP2040.ino>Arduino, digitalRead/WriteFast, 250 MHz</a></td>
<td>December 2022</td> <td>December 2022</td>
</tr> </tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment