Pico GPS Teseo I2C
Loading...
Searching...
No Matches
port
pico
reset.cpp
Go to the documentation of this file.
1
module
;
2
3
#include "hardware/gpio.h"
4
#include "pico/stdlib.h"
5
6
export
module
port_pico_reset
;
7
8
export
namespace
port_pico
{
9
10
11
#define RESET_PIN (18)
12
#define RESET_APPLY_MS (1)
13
// recover must be more than 3 seconds
14
#define RESET_RECOVER_MS (4000)
15
16
17
void
reset
() {
18
gpio_put(
RESET_PIN
, 0);
19
sleep_ms(
RESET_APPLY_MS
);
20
gpio_put(
RESET_PIN
, 1);
21
sleep_ms(
RESET_RECOVER_MS
);
22
return
;
23
}
24
25
void
reset_initialize
() {
26
gpio_init(
RESET_PIN
);
27
gpio_put(
RESET_PIN
, 1);
28
gpio_set_dir(
RESET_PIN
, GPIO_OUT);
29
}
30
31
}
port_pico_reset
port_pico
Definition
reset.cpp:8
port_pico::reset_initialize
void reset_initialize()
Definition
reset.cpp:25
port_pico::reset
void reset()
Definition
reset.cpp:17
RESET_PIN
#define RESET_PIN
Definition
reset.cpp:11
RESET_APPLY_MS
#define RESET_APPLY_MS
Definition
reset.cpp:12
RESET_RECOVER_MS
#define RESET_RECOVER_MS
Definition
reset.cpp:14
Generated by
1.13.2