Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RF24
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
RF24
Commits
4d52e67a
Commit
4d52e67a
authored
Apr 03, 2016
by
akatran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update compatibility.c
parent
a8f100b2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
utility/ATXMegaD3/compatibility.c
utility/ATXMegaD3/compatibility.c
+4
-11
No files found.
utility/ATXMegaD3/compatibility.c
View file @
4d52e67a
...
...
@@ -10,7 +10,6 @@
#include <util/delay.h>
volatile
uint32_t
_millis
;
//volatile uint32_t _secsCounter;
void
__msleep
(
int
milisec
)
{
...
...
@@ -35,17 +34,17 @@ void __start_timer()
// Timer details : Clock is 32MHz, Timer resolution is 8bit, Prescaler is 256, Period is 124, Real Time is 0.001s
/* Set the timer to run at the fastest rate. */
TC
C
0
.
CTRLA
=
TC_CLKSEL_DIV256_gc
;
TC
E
0
.
CTRLA
=
TC_CLKSEL_DIV256_gc
;
/* Configure the timer for normal counting. */
TC
C
0
.
CTRLB
=
TC_WGMODE_NORMAL_gc
;
TC
E
0
.
CTRLB
=
TC_WGMODE_NORMAL_gc
;
/* At 2 MHz, one tick is 0.5 us. Set period to 8 us. */
TC
C
0
.
PER
=
124
;
TC
E
0
.
PER
=
124
;
//TCC0.PER = 2;
/* Configure timer to generate an interrupt on overflow. */
TC
C
0
.
INTCTRLA
=
TC_OVFINTLVL_HI_gc
;
TC
E
0
.
INTCTRLA
=
TC_OVFINTLVL_HI_gc
;
/* Enable this interrupt level. */
PMIC
.
CTRL
=
PMIC_LOLVLEN_bm
|
PMIC_MEDLVLEN_bm
|
PMIC_HILVLEN_bm
;
...
...
@@ -61,12 +60,6 @@ long __millis()
void
update_milisec
()
{
_millis
++
;
//_secsCounter++;
//if (_secsCounter>=1000)
//{
//_secsCounter =0;
//PORTF.OUTTGL = 128;
//}
}
...
...
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