Skip to content

Commit 866e5e5

Browse files
committed
ports: analog: Define SUBSEC_PER_TICK for MAX32665 & MAX32650
Signed-off-by: Brandon-Hurst <brandon.hurst97@gmail.com>
1 parent 8608024 commit 866e5e5

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

ports/analog/max32_port.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
#include "peripherals/max32690/max32_i2c.h"
2828
#include "peripherals/max32690/max32_spi.h"
2929

30+
// 12-bit ssec register, ticks @ 4096 Hz
31+
#define SUBSEC_PER_TICK 4
32+
3033
/** START: GPIO4 Handling specific to MAX32690 */
3134
#define GPIO4_PIN_MASK 0x00000003
3235
#define GPIO4_RESET_MASK 0xFFFFFF77
@@ -60,6 +63,9 @@
6063
#include "system_max32650.h"
6164
#include "max32650.h"
6265

66+
// 12-bit ssec register, ticks @ 4096 Hz
67+
#define SUBSEC_PER_TICK 4
68+
6369
// UART Ports & pins
6470
#include "peripherals/max32650/max32_uart.h"
6571
#include "peripherals/max32650/max32_i2c.h"
@@ -70,6 +76,9 @@
7076
#include "system_max32665.h"
7177
#include "max32665.h"
7278

79+
// 12-bit ssec register, ticks @ 4096 Hz
80+
#define SUBSEC_PER_TICK 4
81+
7382
// UART Ports & pins
7483
#include "peripherals/max32665/max32_uart.h"
7584
#include "peripherals/max32665/max32_i2c.h"
@@ -91,9 +100,4 @@ extern uint32_t SystemCoreClock;
91100
// Tick timer should be 1/1024 s. RTC Oscillator is usually 32.768 kHz ERTCO.
92101
#define TICKS_PER_SEC 1024
93102

94-
#ifdef MAX32690
95-
// 12-bit ssec register, ticks @ 4096 Hz
96-
#define SUBSEC_PER_TICK 4
97-
#endif
98-
99103
#endif // MAX32_PORT_H

0 commit comments

Comments
 (0)