Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
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
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dos
flow3r firmware
Commits
9075ea71
Commit
9075ea71
authored
1 year ago
by
q3k
Browse files
Options
Downloads
Patches
Plain Diff
components/badge23: remove spurious i2c init
parent
627524ad
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
components/badge23/espan.c
+0
-37
0 additions, 37 deletions
components/badge23/espan.c
with
0 additions
and
37 deletions
components/badge23/espan.c
+
0
−
37
View file @
9075ea71
...
...
@@ -22,41 +22,6 @@
static
const
char
*
TAG
=
"espan"
;
#define I2C_MASTER_NUM 0
/*!< I2C master i2c port number, the number of i2c peripheral interfaces available will depend on the chip */
#define I2C_MASTER_FREQ_HZ 400000
/*!< I2C master clock frequency */
#define I2C_MASTER_TX_BUF_DISABLE 0
/*!< I2C master doesn't need buffer */
#define I2C_MASTER_RX_BUF_DISABLE 0
/*!< I2C master doesn't need buffer */
#if defined(CONFIG_BADGE23_HW_GEN_P3) || defined(CONFIG_BADGE23_HW_GEN_P4) || defined(CONFIG_BADGE23_HW_GEN_P6)
#define CONFIG_I2C_MASTER_SDA 2
#define CONFIG_I2C_MASTER_SCL 1
#elif defined(CONFIG_BADGE23_HW_GEN_P1)
#define CONFIG_I2C_MASTER_SDA 10
#define CONFIG_I2C_MASTER_SCL 9
#else
#error "i2c not implemented for this badge generation"
#endif
static
esp_err_t
i2c_master_init
(
void
)
{
int
i2c_master_port
=
I2C_MASTER_NUM
;
i2c_config_t
conf
=
{
.
mode
=
I2C_MODE_MASTER
,
.
sda_io_num
=
CONFIG_I2C_MASTER_SDA
,
.
scl_io_num
=
CONFIG_I2C_MASTER_SCL
,
.
sda_pullup_en
=
GPIO_PULLUP_ENABLE
,
.
scl_pullup_en
=
GPIO_PULLUP_ENABLE
,
.
master
.
clk_speed
=
I2C_MASTER_FREQ_HZ
,
};
i2c_param_config
(
i2c_master_port
,
&
conf
);
return
i2c_driver_install
(
i2c_master_port
,
conf
.
mode
,
I2C_MASTER_RX_BUF_DISABLE
,
I2C_MASTER_TX_BUF_DISABLE
,
0
);
}
static
uint8_t
hw_init_done
=
0
;
static
void
io_fast_task
(
void
*
data
){
...
...
@@ -86,8 +51,6 @@ void badge23_main(void)
{
locks_init
();
ESP_LOGI
(
TAG
,
"Starting on %s..."
,
flow3r_bsp_hw_name
);
ESP_ERROR_CHECK
(
i2c_master_init
());
ESP_LOGI
(
TAG
,
"I2C initialized successfully"
);
audio_init
();
leds_init
();
...
...
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