Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
MSP430FR5994 BOOSTXL-CC1120-90 Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Energy-Driven Computing
MSP430FR5994 BOOSTXL-CC1120-90 Library
Commits
d1b88d2f
Commit
d1b88d2f
authored
5 years ago
by
Edward Longman
Browse files
Options
Downloads
Patches
Plain Diff
Add the UART library to normal compile so that it includes the ISR add some basic UART output
parent
3c317116
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
source/CMakeLists.txt
+4
-1
4 additions, 1 deletion
source/CMakeLists.txt
source/test/min2.c
+17
-3
17 additions, 3 deletions
source/test/min2.c
with
21 additions
and
4 deletions
source/CMakeLists.txt
+
4
−
1
View file @
d1b88d2f
...
@@ -20,7 +20,10 @@ link_directories(
...
@@ -20,7 +20,10 @@ link_directories(
add_executable
(
${
PROJECT_NAME
}
_min test/min.c lib/hal_mcu/hal_mcu.c
)
add_executable
(
${
PROJECT_NAME
}
_min test/min.c lib/hal_mcu/hal_mcu.c
)
target_link_libraries
(
${
PROJECT_NAME
}
_min uart_drv
)
target_link_libraries
(
${
PROJECT_NAME
}
_min uart_drv
)
add_executable
(
${
PROJECT_NAME
}
_min2 test/min2.c lib/hal_mcu/hal_mcu.c
)
add_executable
(
${
PROJECT_NAME
}
_min2 test/min2.c lib/hal_mcu/hal_mcu.c
lib/uart_drv/uart_drv.c
lib/uart_drv/circ_buf.c
lib/uart_drv/ee_printf.c
)
target_link_libraries
(
${
PROJECT_NAME
}
_min2
)
target_link_libraries
(
${
PROJECT_NAME
}
_min2
)
add_executable
(
${
PROJECT_NAME
}
_rxer test/LaunchPad_trx_main.c test/LaunchPad_trx_demo.c
)
add_executable
(
${
PROJECT_NAME
}
_rxer test/LaunchPad_trx_main.c test/LaunchPad_trx_demo.c
)
...
...
This diff is collapsed.
Click to expand it.
source/test/min2.c
+
17
−
3
View file @
d1b88d2f
...
@@ -2,14 +2,20 @@
...
@@ -2,14 +2,20 @@
#include
"stdio.h"
#include
"stdio.h"
#include
"lib/radio_drv/hal_types.h"
#include
"lib/radio_drv/hal_types.h"
#include
"lib/hal_mcu/hal_mcu_fr5.h"
#include
"lib/hal_mcu/hal_mcu_fr5.h"
#include
"lib/uart_drv/uart_drv.h"
/******************************************************************************
/******************************************************************************
* LOCAL FUNCTIONS
* LOCAL FUNCTIONS
*/
*/
extern
void
msp_setup
(
void
);
extern
void
msp_setup
(
void
);
unsigned
long
volatile
time_counter
;
int
ee_printf
(
const
char
*
fmt
,
...);
/******************************************************************************
* GLOBALS
*/
char
u_str
[
UART_BUFF_SIZE
];
unsigned
char
txBuffer
[
TX_BUFF_SIZE
];
unsigned
long
volatile
time_counter
;
/******************************************************************************
/******************************************************************************
* @fn main
* @fn main
...
@@ -44,6 +50,9 @@ void main (void)
...
@@ -44,6 +50,9 @@ void main (void)
//Comes from lib/hal_mcu/hal_mcu.c
//Comes from lib/hal_mcu/hal_mcu.c
msp_setup
();
msp_setup
();
/* Initialize the UART port */
hal_uart_init
();
// Enable the interupts on port 2 to catch the user button (TRXEB)
// Enable the interupts on port 2 to catch the user button (TRXEB)
...
@@ -53,9 +62,13 @@ void main (void)
...
@@ -53,9 +62,13 @@ void main (void)
/* Infinite loop with a 1 second timer */
/* Infinite loop with a 1 second timer */
while
(
1
)
while
(
1
)
{
{
P1OUT
^=
BIT0
;
_delay_us
(
4166
);
_delay_us
(
4166
);
_delay_us
(
8332
);
_delay_us
(
8332
);
if
(
idle_counter
!=
time_counter
){
idle_counter
=
time_counter
;
ee_printf
(
"Cnt:%3i
\n\r
"
,
idle_counter
);
_delay_us
(
100000
);
}
}
}
}
}
...
@@ -75,6 +88,7 @@ void main (void)
...
@@ -75,6 +88,7 @@ void main (void)
*/
*/
HAL_ISR_FUNC_DECLARATION
(
wdt_isr
,
WDT
)
HAL_ISR_FUNC_DECLARATION
(
wdt_isr
,
WDT
)
{
{
time_counter
++
;
/* global "0.5 second" counter used for printing time stamped packet sniffer data */
/* global "0.5 second" counter used for printing time stamped packet sniffer data */
P1OUT
^=
BIT1
;
P1OUT
^=
BIT1
;
...
...
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