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-nRF5
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-nRF5
Commits
bd6beba4
Commit
bd6beba4
authored
Apr 07, 2017
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused interrupt from Wire lib
parent
8747fa2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
22 deletions
+4
-22
libraries/Wire/Wire.h
libraries/Wire/Wire.h
+2
-3
libraries/Wire/Wire_nRF51.cpp
libraries/Wire/Wire_nRF51.cpp
+2
-19
No files found.
libraries/Wire/Wire.h
View file @
bd6beba4
...
...
@@ -39,7 +39,7 @@ class TwoWire : public Stream
#ifdef NRF52
TwoWire
(
NRF_TWIM_Type
*
p_twim
,
NRF_TWIS_Type
*
p_twis
,
IRQn_Type
IRQn
,
uint8_t
pinSDA
,
uint8_t
pinSCL
);
#else
TwoWire
(
NRF_TWI_Type
*
p_twi
,
IRQn_Type
IRQn
,
uint8_t
pinSDA
,
uint8_t
pinSCL
);
TwoWire
(
NRF_TWI_Type
*
p_twi
,
uint8_t
pinSDA
,
uint8_t
pinSCL
);
#endif
void
begin
();
#ifdef NRF52
...
...
@@ -65,12 +65,11 @@ class TwoWire : public Stream
#ifdef NRF52
void
onReceive
(
void
(
*
)(
int
));
void
onRequest
(
void
(
*
)(
void
));
void
onService
(
void
);
#endif
using
Print
::
write
;
void
onService
(
void
);
private:
#ifdef NRF52
NRF_TWIM_Type
*
_p_twim
;
...
...
libraries/Wire/Wire_nRF51.cpp
View file @
bd6beba4
...
...
@@ -30,10 +30,9 @@ extern "C" {
#include "Wire.h"
TwoWire
::
TwoWire
(
NRF_TWI_Type
*
p_twi
,
IRQn_Type
IRQn
,
uint8_t
pinSDA
,
uint8_t
pinSCL
)
TwoWire
::
TwoWire
(
NRF_TWI_Type
*
p_twi
,
uint8_t
pinSDA
,
uint8_t
pinSCL
)
{
this
->
_p_twi
=
p_twi
;
this
->
_IRQn
=
IRQn
;
this
->
_uc_pinSDA
=
g_ADigitalPinMap
[
pinSDA
];
this
->
_uc_pinSCL
=
g_ADigitalPinMap
[
pinSCL
];
transmissionBegun
=
false
;
...
...
@@ -59,10 +58,6 @@ void TwoWire::begin(void) {
_p_twi
->
ENABLE
=
(
TWI_ENABLE_ENABLE_Enabled
<<
TWI_ENABLE_ENABLE_Pos
);
_p_twi
->
PSELSCL
=
_uc_pinSCL
;
_p_twi
->
PSELSDA
=
_uc_pinSDA
;
NVIC_ClearPendingIRQ
(
_IRQn
);
NVIC_SetPriority
(
_IRQn
,
2
);
NVIC_EnableIRQ
(
_IRQn
);
}
void
TwoWire
::
setClock
(
uint32_t
baudrate
)
{
...
...
@@ -277,20 +272,8 @@ void TwoWire::flush(void)
// data transfer.
}
void
TwoWire
::
onService
(
void
)
{
}
#if WIRE_INTERFACES_COUNT > 0
TwoWire
Wire
(
NRF_TWI1
,
SPI1_TWI1_IRQn
,
PIN_WIRE_SDA
,
PIN_WIRE_SCL
);
extern
"C"
{
void
SPI1_TWI1_IRQHandler
(
void
)
{
Wire
.
onService
();
}
}
TwoWire
Wire
(
NRF_TWI1
,
PIN_WIRE_SDA
,
PIN_WIRE_SCL
);
#endif
#endif
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