diff options
author | Fabio Utzig <utzig@utzig.org> | 2016-10-23 12:41:24 +0000 |
---|---|---|
committer | Fabio Utzig <utzig@utzig.org> | 2016-10-23 12:41:24 +0000 |
commit | 637701752b118d2a091ed312c0c03e616e207bfe (patch) | |
tree | 4bedac36ab18c2e9fdf4a2daa19a4c42d535e474 /os/hal/ports/AVR/hal_ext_lld.c | |
parent | b668f4b43060ddad6403911987524071ec307cfd (diff) | |
download | ChibiOS-637701752b118d2a091ed312c0c03e616e207bfe.tar.gz ChibiOS-637701752b118d2a091ed312c0c03e616e207bfe.tar.bz2 ChibiOS-637701752b118d2a091ed312c0c03e616e207bfe.zip |
Fixed assumption about EXT trigger mode
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9873 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/AVR/hal_ext_lld.c')
-rw-r--r-- | os/hal/ports/AVR/hal_ext_lld.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/os/hal/ports/AVR/hal_ext_lld.c b/os/hal/ports/AVR/hal_ext_lld.c index 5d767df48..7459806f1 100644 --- a/os/hal/ports/AVR/hal_ext_lld.c +++ b/os/hal/ports/AVR/hal_ext_lld.c @@ -65,7 +65,7 @@ void ext_lld_set_intx_edges(expchannel_t channel, uint8_t edge) { } else if (edge == EXT_CH_MODE_BOTH_EDGES) {
EICRA |= (1 << 0);
EICRA &= ~(1 << 1);
- } else {
+ } else if (edge == EXT_CH_MODE_LOW_LEVEL) {
EICRA &= ~(1 << 0);
EICRA &= ~(1 << 1);
}
@@ -82,7 +82,7 @@ void ext_lld_set_intx_edges(expchannel_t channel, uint8_t edge) { } else if (edge == EXT_CH_MODE_BOTH_EDGES) {
EICRA |= (1 << 2);
EICRA &= ~(1 << 3);
- } else {
+ } else if (edge == EXT_CH_MODE_LOW_LEVEL) {
EICRA &= ~(1 << 2);
EICRA &= ~(1 << 3);
}
@@ -99,7 +99,7 @@ void ext_lld_set_intx_edges(expchannel_t channel, uint8_t edge) { } else if (edge == EXT_CH_MODE_BOTH_EDGES) {
EICRA |= (1 << 4);
EICRA &= ~(1 << 5);
- } else {
+ } else if (edge == EXT_CH_MODE_LOW_LEVEL) {
EICRA &= ~(1 << 4);
EICRA &= ~(1 << 5);
}
@@ -116,7 +116,7 @@ void ext_lld_set_intx_edges(expchannel_t channel, uint8_t edge) { } else if (edge == EXT_CH_MODE_BOTH_EDGES) {
EICRA |= (1 << 6);
EICRA &= ~(1 << 7);
- } else {
+ } else if (edge == EXT_CH_MODE_LOW_LEVEL) {
EICRA &= ~(1 << 6);
EICRA &= ~(1 << 7);
}
@@ -133,7 +133,7 @@ void ext_lld_set_intx_edges(expchannel_t channel, uint8_t edge) { } else if (edge == EXT_CH_MODE_BOTH_EDGES) {
EICRB |= (1 << 0);
EICRB &= ~(1 << 1);
- } else {
+ } else if (edge == EXT_CH_MODE_LOW_LEVEL) {
EICRB &= ~(1 << 0);
EICRB &= ~(1 << 1);
}
@@ -150,7 +150,7 @@ void ext_lld_set_intx_edges(expchannel_t channel, uint8_t edge) { } else if (edge == EXT_CH_MODE_BOTH_EDGES) {
EICRB |= (1 << 2);
EICRB &= ~(1 << 3);
- } else {
+ } else if (edge == EXT_CH_MODE_LOW_LEVEL) {
EICRB &= ~(1 << 2);
EICRB &= ~(1 << 3);
}
|