Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
09e0e895
Commit
09e0e895
authored
6 years ago
by
Joakim Nohlgård
Browse files
Options
Downloads
Patches
Plain Diff
kinetis: GPIO: Enable the correct IRQn on CM0+
parent
9d83b60f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cpu/kinetis/include/cpu_conf_kinetis.h
+1
-0
1 addition, 0 deletions
cpu/kinetis/include/cpu_conf_kinetis.h
cpu/kinetis/periph/gpio.c
+5
-2
5 additions, 2 deletions
cpu/kinetis/periph/gpio.c
with
6 additions
and
2 deletions
cpu/kinetis/include/cpu_conf_kinetis.h
+
1
−
0
View file @
09e0e895
...
@@ -155,6 +155,7 @@ extern "C"
...
@@ -155,6 +155,7 @@ extern "C"
#define LPTMR0_IRQn LPTimer_IRQn
#define LPTMR0_IRQn LPTimer_IRQn
#define PIT_TCTRL_CHN_MASK (0x4u)
#define PIT_TCTRL_CHN_MASK (0x4u)
#define PIT_TCTRL_CHN_SHIFT (2)
#define PIT_TCTRL_CHN_SHIFT (2)
#define PORT_IRQS { PORTA_IRQn, PORTB_IRQn, PORTC_IRQn, PORTD_IRQn, PORTE_IRQn }
#endif
/* MK20D7_H_ */
#endif
/* MK20D7_H_ */
/** @} */
/** @} */
...
...
This diff is collapsed.
Click to expand it.
cpu/kinetis/periph/gpio.c
+
5
−
2
View file @
09e0e895
...
@@ -113,6 +113,7 @@ static isr_ctx_t isr_ctx[CTX_NUMOF];
...
@@ -113,6 +113,7 @@ static isr_ctx_t isr_ctx[CTX_NUMOF];
*/
*/
static
uint32_t
isr_map
[
ISR_MAP_SIZE
];
static
uint32_t
isr_map
[
ISR_MAP_SIZE
];
static
const
uint8_t
port_irqs
[]
=
PORT_IRQS
;
static
inline
PORT_Type
*
port
(
gpio_t
pin
)
static
inline
PORT_Type
*
port
(
gpio_t
pin
)
{
{
...
@@ -217,9 +218,11 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
...
@@ -217,9 +218,11 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank,
/* clear interrupt flags */
/* clear interrupt flags */
port
(
pin
)
->
ISFR
&=
~
(
1
<<
pin_num
(
pin
));
port
(
pin
)
->
ISFR
&=
~
(
1
<<
pin_num
(
pin
));
/* enable global port interrupts in the NVIC */
/* enable global port interrupts in the NVIC */
NVIC_EnableIRQ
(
PORTA_IRQn
+
port_num
(
pin
));
NVIC_EnableIRQ
(
port_irqs
[
port_num
(
pin
)]);
/* finally, enable the interrupt for the select pin */
/* finally, enable the interrupt for the selected pin */
port
(
pin
)
->
PCR
[
pin_num
(
pin
)]
|=
flank
;
port
(
pin
)
->
PCR
[
pin_num
(
pin
)]
|=
flank
;
return
0
;
return
0
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment