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
ed6dc701
Commit
ed6dc701
authored
7 years ago
by
Francois Berder
Browse files
Options
Downloads
Patches
Plain Diff
boards: pic32-clicker: Add LEDs support
Signed-off-by:
Francois Berder
<
fberder@outlook.fr
>
parent
472eeb00
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
boards/pic32-clicker/clicker.c
+7
-0
7 additions, 0 deletions
boards/pic32-clicker/clicker.c
boards/pic32-clicker/include/board.h
+19
-0
19 additions, 0 deletions
boards/pic32-clicker/include/board.h
with
26 additions
and
0 deletions
boards/pic32-clicker/clicker.c
+
7
−
0
View file @
ed6dc701
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
*/
*/
#include
<stdio.h>
#include
<stdio.h>
#include
<stdint.h>
#include
<stdint.h>
#include
"periph/gpio.h"
#include
"periph/uart.h"
#include
"periph/uart.h"
#include
"bitarithm.h"
#include
"bitarithm.h"
#include
"board.h"
#include
"board.h"
...
@@ -29,6 +30,12 @@ void board_init(void)
...
@@ -29,6 +30,12 @@ void board_init(void)
uart_init
(
DEBUG_VIA_UART
,
DEBUG_UART_BAUD
,
NULL
,
0
);
uart_init
(
DEBUG_VIA_UART
,
DEBUG_UART_BAUD
,
NULL
,
0
);
#endif
#endif
/* Turn off all LED's */
gpio_init
(
LED1_PIN
,
GPIO_OUT
);
gpio_init
(
LED2_PIN
,
GPIO_OUT
);
LED1_OFF
;
LED2_OFF
;
/* Stop the linker from throwing away the PIC32 config register settings */
/* Stop the linker from throwing away the PIC32 config register settings */
dummy
();
dummy
();
}
}
...
...
This diff is collapsed.
Click to expand it.
boards/pic32-clicker/include/board.h
+
19
−
0
View file @
ed6dc701
...
@@ -47,6 +47,25 @@ extern "C" {
...
@@ -47,6 +47,25 @@ extern "C" {
*/
*/
#define EIC_IRQ (1)
#define EIC_IRQ (1)
/**
* @brief LED pin configuration
* @{
*/
#define LED1_PIN GPIO_PIN(PORT_B, 1)
#define LED2_PIN GPIO_PIN(PORT_B, 2)
#define LED1_MASK (1 << 1)
#define LED2_MASK (1 << 2)
#define LED1_ON (LATBSET = LED1_MASK)
#define LED1_OFF (LATBCLR = LED1_MASK)
#define LED1_TOGGLE (LATBINV = LED1_MASK)
#define LED2_ON (LATBSET = LED2_MASK)
#define LED2_OFF (LATBCLR = LED2_MASK)
#define LED2_TOGGLE (LATBINV = LED2_MASK)
/** @} */
/**
/**
* @brief Board level initialisation
* @brief Board level initialisation
*/
*/
...
...
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