Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
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
Container Registry
Model registry
Operate
Environments
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
ln
firmware
Commits
b76ac8fc
Verified
Commit
b76ac8fc
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Patches
Plain Diff
feat(epicardium): Mirror card10_init in hardware_early_init
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
6c87ece6
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
epicardium/modules/hardware.c
+69
-1
69 additions, 1 deletion
epicardium/modules/hardware.c
with
69 additions
and
1 deletion
epicardium/modules/hardware.c
+
69
−
1
View file @
b76ac8fc
...
...
@@ -9,6 +9,15 @@
#include
"modules/stream.h"
#include
"card10.h"
#include
"display.h"
#include
"leds.h"
#include
"pb.h"
#include
"pmic.h"
#include
"portexpander.h"
#include
"gpio.h"
#include
"i2c.h"
#include
"spi.h"
/*
* Early init is called at the very beginning and is meant for modules which
...
...
@@ -17,7 +26,66 @@
*/
int
hardware_early_init
(
void
)
{
card10_init
();
/*
* I2C bus for onboard peripherals (ie. PMIC, BMA400, BHI160, BME680,
* ...)
*/
I2C_Shutdown
(
MXC_I2C1_BUS0
);
I2C_Init
(
MXC_I2C1_BUS0
,
I2C_FAST_MODE
,
NULL
);
#ifndef CARD10_DEBUG_CORE1
/*
* SAO I2C bus
*/
I2C_Shutdown
(
MXC_I2C0_BUS0
);
I2C_Init
(
MXC_I2C0_BUS0
,
I2C_FAST_MODE
,
NULL
);
#endif
/*
* GPIO peripheral.
*/
GPIO_Init
();
/*
* PMIC (MAX77650)
*/
pmic_init
();
pmic_set_led
(
0
,
0
);
pmic_set_led
(
1
,
0
);
pmic_set_led
(
2
,
0
);
/*
* Harmonic Board Portexpander
*/
portexpander_init
();
/*
* Buttons
*/
PB_Init
();
/*
* SPI for ECG
*/
const
sys_cfg_spi_t
spi17y_master_cfg
=
{
.
map
=
MAP_A
,
.
ss0
=
Enable
,
.
ss1
=
Disable
,
.
ss2
=
Disable
,
};
if
(
SPI_Init
(
SPI0
,
0
,
SPI_SPEED
,
spi17y_master_cfg
)
!=
0
)
{
LOG_ERR
(
"init"
,
"Error configuring SPI"
);
while
(
1
)
;
}
display_init
();
/*
* RGB LEDs
*/
leds_init
();
#ifdef CARD10_DEBUG_CORE1
/*
...
...
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