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
783bab6c
Commit
783bab6c
authored
8 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Costmetic changes from review of last PR
parent
0d2698a7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
arch/arm/src/stm32/stm32_1wire.h
+1
-13
1 addition, 13 deletions
arch/arm/src/stm32/stm32_1wire.h
arch/arm/src/stm32l4/stm32l4_i2c.c
+20
-14
20 additions, 14 deletions
arch/arm/src/stm32l4/stm32l4_i2c.c
with
21 additions
and
27 deletions
arch/arm/src/stm32/stm32_1wire.h
+
1
−
13
View file @
783bab6c
...
...
@@ -45,19 +45,7 @@
#include
"stm32_uart.h"
/************************************************************************************
* Pre-processor Definitions
************************************************************************************/
/************************************************************************************
* Public Types
************************************************************************************/
/************************************************************************************
* Public Data
************************************************************************************/
/************************************************************************************
* Public Functions
* Public Function Prototypes
************************************************************************************/
/****************************************************************************
...
...
This diff is collapsed.
Click to expand it.
arch/arm/src/stm32l4/stm32l4_i2c.c
+
20
−
14
View file @
783bab6c
...
...
@@ -268,9 +268,9 @@ struct stm32l4_i2c_priv_s
************************************************************************************/
static
inline
uint32_t
stm32l4_i2c_getreg32
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
,
uint8_t
offset
);
static
inline
void
stm32l4_i2c_putreg32
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
,
uint8_t
offset
,
uint32_t
value
);
uint8_t
offset
);
static
inline
void
stm32l4_i2c_putreg32
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
,
uint8_t
offset
,
uint32_t
value
);
static
inline
void
stm32l4_i2c_modifyreg32
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
,
uint8_t
offset
,
uint32_t
clearbits
,
uint32_t
setbits
);
...
...
@@ -285,13 +285,14 @@ static inline void stm32l4_i2c_sem_init(FAR struct stm32l4_i2c_priv_s *priv);
static
inline
void
stm32l4_i2c_sem_destroy
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
);
#ifdef CONFIG_I2C_TRACE
static
void
stm32l4_i2c_tracereset
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
);
static
void
stm32l4_i2c_tracenew
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
,
uint32_t
status
);
static
void
stm32l4_i2c_tracenew
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
,
uint32_t
status
);
static
void
stm32l4_i2c_traceevent
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
,
enum
stm32l4_trace_e
event
,
uint32_t
parm
);
enum
stm32l4_trace_e
event
,
uint32_t
parm
);
static
void
stm32l4_i2c_tracedump
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
);
#endif
/* CONFIG_I2C_TRACE */
static
void
stm32l4_i2c_setclock
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
,
uint32_t
frequency
);
uint32_t
frequency
);
static
inline
void
stm32l4_i2c_sendstart
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
);
static
inline
void
stm32l4_i2c_clrstart
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
);
static
inline
void
stm32l4_i2c_sendstop
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
);
...
...
@@ -310,8 +311,8 @@ static int stm32l4_i2c3_isr(int irq, void *context);
#endif
static
int
stm32l4_i2c_init
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
);
static
int
stm32l4_i2c_deinit
(
FAR
struct
stm32l4_i2c_priv_s
*
priv
);
static
int
stm32l4_i2c_transfer
(
FAR
struct
i2c_master_s
*
dev
,
FAR
struct
i2c_msg_s
*
msgs
,
int
count
);
static
int
stm32l4_i2c_transfer
(
FAR
struct
i2c_master_s
*
dev
,
FAR
struct
i2c_msg_s
*
msgs
,
int
count
);
#ifdef CONFIG_I2C_RESET
static
int
stm32l4_i2c_reset
(
FAR
struct
i2c_master_s
*
dev
);
#endif
...
...
@@ -1004,22 +1005,27 @@ static void stm32l4_i2c_setclock(FAR struct stm32l4_i2c_priv_s *priv, uint32_t f
uint8_t
scl_h_period
;
uint8_t
scl_l_period
;
/* XXX haque; these are the only freqs we support at the moment, until we can compute the values ourself */
/* XXX haque; these are the only freqs we support at the moment, until we can
* compute the values ourself.
*/
if
(
frequency
==
10000
)
{}
{
}
else
if
(
frequency
==
100000
)
{}
{
}
else
if
(
frequency
==
400000
)
{}
{
}
else
{
{
#if 1
frequency
=
1000000
;
#else
frequency
=
500000
;
#endif
}
}
/* Has the I2C bus frequency changed? */
...
...
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