Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
DIOT Monitoring Module
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
6
Issues
6
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
DIOT Monitoring Module
Commits
2f1ad44a
Commit
2f1ad44a
authored
Jun 28, 2020
by
Christos Gentsos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Master: add DUT power cycle function
parent
d6814dc3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
0 deletions
+27
-0
atmel_start_config.atstart
test_master/atmel_start_prj/atmel_start_config.atstart
+6
-0
atmel_start_pins.h
test_master/atmel_start_prj/atmel_start_pins.h
+1
-0
driver_init.c
test_master/atmel_start_prj/driver_init.c
+14
-0
main.c
test_master/src/main.c
+6
-0
No files found.
test_master/atmel_start_prj/atmel_start_config.atstart
View file @
2f1ad44a
...
...
@@ -706,6 +706,12 @@ pads:
mode: Digital output
user_label: LED
configuration: null
PCYC:
name: PA18
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::pad::PA18
mode: Digital output
user_label: PCYC
configuration: null
PA22:
name: PA22
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::pad::PA22
...
...
test_master/atmel_start_prj/atmel_start_pins.h
View file @
2f1ad44a
...
...
@@ -23,6 +23,7 @@
#define PA02 GPIO(GPIO_PORTA, 2)
#define LED GPIO(GPIO_PORTA, 17)
#define PCYC GPIO(GPIO_PORTA, 18)
#define PA22 GPIO(GPIO_PORTA, 22)
#define PA23 GPIO(GPIO_PORTA, 23)
#define PA24 GPIO(GPIO_PORTA, 24)
...
...
test_master/atmel_start_prj/driver_init.c
View file @
2f1ad44a
...
...
@@ -205,6 +205,20 @@ void system_init(void)
gpio_set_pin_function
(
LED
,
GPIO_PIN_FUNCTION_OFF
);
// GPIO on PA18
gpio_set_pin_level
(
PCYC
,
// <y> Initial level
// <id> pad_initial_level
// <false"> Low
// <true"> High
false
);
// Set pin direction to output
gpio_set_pin_direction
(
PCYC
,
GPIO_DIRECTION_OUT
);
gpio_set_pin_function
(
PCYC
,
GPIO_PIN_FUNCTION_OFF
);
ADC_0_init
();
I2C_0_init
();
...
...
test_master/src/main.c
View file @
2f1ad44a
...
...
@@ -161,6 +161,12 @@ void user_interaction()
check_res_print_error
(
res
);
}
break
;
case
'P'
:
print
(
"Power cycling the MoniMods..."
);
gpio_set_pin_level
(
PCYC
,
1
);
delay_ms
(
1000
);
gpio_set_pin_level
(
PCYC
,
0
);
break
;
case
'v'
:
res
=
i2c_m_sync_my_cmd_read
(
&
I2C_0
,
0x8B
,
(
uint8_t
*
)
&
volt
,
2
);
check_res_print_error
(
res
);
...
...
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