Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
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
f4grx
NuttX RTOS
Commits
9af0ee7f
Commit
9af0ee7f
authored
9 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
DS323x: Costmetic cleanup
parent
b9515335
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
drivers/timers/ds3231.h
+17
-9
17 additions, 9 deletions
drivers/timers/ds3231.h
with
17 additions
and
9 deletions
drivers/timers/ds3231.h
+
17
−
9
View file @
9af0ee7f
...
...
@@ -131,24 +131,32 @@
# define DS1302_CR_WP (1 << 7)
/* Bit 7: Write protect */
# define DS1302_TCR 0x08
/* Trickle charge register */
# define DS1302_TCR_RS_SHIFT (0)
/* Bits 0-1: Ran
g
e select */
# define DS1302_TCR_RS_SHIFT (0)
/* Bits 0-1: R
eist
an
c
e select */
# define DS1302_TCR_RS_MASK (3 << DS1302_TCR_RS_SHIFT)
# define DS1302_TCR_RS(n) ((uint8_t)(n) << DS1302_TCR_RS_SHIFT)
# define DS1302_TCR_RS_DISABLED (0 << DS1302_TCR_RS_SHIFT)
# define DS1302_TCR_RS_2OHM (1 << DS1302_TCR_RS_SHIFT)
# define DS1302_TCR_RS_4OHM (2 << DS1302_TCR_RS_SHIFT)
# define DS1302_TCR_RS_8OHM (3 << DS1302_TCR_RS_SHIFT)
# define DS1302_TCR_DS_SHIFT (4)
/* Bits 2-3: Diode select */
# define DS1302_TCR_DS_MASK (3 << DS1302_TCR_DS_SHIFT)
# define DS1302_TCR_DS(n) ((uint8_t)(n) << DS1302_TCR_DS_SHIFT)
# define DS1302_TCR_DS_DISABLED (0 << DS1302_TCR_DS_SHIFT)
# define DS1302_TCR_DS_1DIODE (1 << DS1302_TCR_DS_SHIFT)
# define DS1302_TCR_DS_2DIODE (2 << DS1302_TCR_DS_SHIFT)
# define DS1302_TCR_DS_DISABLED_2 (3 << DS1302_TCR_DS_SHIFT)
# define DS1302_TCR_TCS_SHIFT (4)
/* Bits 4-7: Trickle charge select */
# define DS1302_TCR_TCS_MASK (15 << DS1302_TCR_TCS_SHIFT)
# define DS1302_TCR_TCS(n) ((uint8_t)(n) << DS1302_TCR_TCS_SHIFT)
# define DS1302_TCR_DISABLED (DS1302_TCR_RS
(0) | define
DS1302_TCR_DS
(0)
| define DS1302_TCR_TCS(0))
# define DS1302_TCR_1DIODE_2OHM (DS1302_TCR_RS
(1) | define
DS1302_TCR_DS
(1)
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_1DIODE_4OHM (DS1302_TCR_RS
(2) | define
DS1302_TCR_DS
(1)
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_1DIODE_8OHM (DS1302_TCR_RS
(3) | define
DS1302_TCR_DS
(1)
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_2DIODE_2OHM (DS1302_TCR_RS
(1) | define
DS1302_TCR_DS
(2)
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_2DIODE_4OHM (DS1302_TCR_RS
(2) | define
DS1302_TCR_DS
(2)
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_2DIODE_8OHM (DS1302_TCR_RS
(3) | define
DS1302_TCR_DS
(2)
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_INIT (DS1302_TCR_RS
(0) | define
DS1302_TCR_DS
(3)
| define DS1302_TCR_TCS(5))
# define DS1302_TCR_DISABLED (DS1302_TCR_RS
_DISABLED |
DS1302_TCR_DS
_DISABLED
| define DS1302_TCR_TCS(0))
# define DS1302_TCR_1DIODE_2OHM (DS1302_TCR_RS
_2OHM |
DS1302_TCR_DS
_1DIODE
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_1DIODE_4OHM (DS1302_TCR_RS
_4OHM |
DS1302_TCR_DS
_1DIODE
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_1DIODE_8OHM (DS1302_TCR_RS
_8OHM |
DS1302_TCR_DS
_1DIODE
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_2DIODE_2OHM (DS1302_TCR_RS
_2OHM |
DS1302_TCR_DS
_2DIODE
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_2DIODE_4OHM (DS1302_TCR_RS
_4OHM |
DS1302_TCR_DS
_2DIODE
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_2DIODE_8OHM (DS1302_TCR_RS
_8OHM |
DS1302_TCR_DS
_2DIODE
| define DS1302_TCR_TCS(10))
# define DS1302_TCR_INIT (DS1302_TCR_RS
_DISABLED |
DS1302_TCR_DS
_DISABLED_2
| define DS1302_TCR_TCS(5))
#endif
#ifdef CONFIG_RTC_DS1307
...
...
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