Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-pico
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-pico
Commits
d9a4bbd9
Unverified
Commit
d9a4bbd9
authored
Mar 30, 2021
by
Earle F. Philhower, III
Committed by
GitHub
Mar 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ancient AVR compatibility macros (#59)
parent
3d824aac
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
cores/rp2040/Arduino.h
cores/rp2040/Arduino.h
+15
-3
cores/rp2040/pgmspace.h
cores/rp2040/pgmspace.h
+1
-0
platform.txt
platform.txt
+1
-1
No files found.
cores/rp2040/Arduino.h
View file @
d9a4bbd9
...
...
@@ -26,9 +26,10 @@
#include <string.h>
#include "api/ArduinoAPI.h"
#include <pins_arduino.h>
#define digitalPinToInterrupt(P) (P)
// Required for the port*Register macros
#include "hardware/gpio.h"
#include "debug_internal.h"
...
...
@@ -36,13 +37,24 @@
extern
"C"
{
#endif // __cplusplus
// Disable/reenable all interrupts. Safely handles nested disables
void
interrupts
();
void
noInterrupts
();
// GPIO change/value interrupts
void
attachInterrupt
(
pin_size_t
pin
,
voidFuncPtr
callback
,
PinStatus
mode
);
void
detachInterrupt
(
pin_size_t
pin
);
// AVR compatibilty macros...naughty and accesses the HW directly
#define digitalPinToPort(pin) (0)
#define digitalPinToBitMask(pin) (1UL << (pin))
#define digitalPinToTimer(pin) (0)
#define digitalPinToInterrupt(pin) (pin)
#define portOutputRegister(port) ((volatile uint32_t*) sio_hw->gpio_out)
#define portInputRegister(port) ((volatile uint32_t*) sio_hw->gpio_in)
#define portModeRegister(port) ((volatile uint32_t*) sio_hw->gpio_oe)
// IO config
void
pinMode
(
pin_size_t
pinNumber
,
PinMode
pinMode
);
// SIO (GPIO)
...
...
cores/rp2040/pgmspace.h
0 → 100644
View file @
d9a4bbd9
#include <avr/pgmspace.h>
platform.txt
View file @
d9a4bbd9
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment