summaryrefslogtreecommitdiff
path: root/tmk_core/protocol/arm_atsam/clks.h
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2019-08-30 11:19:03 -0700
committerFlorian Didron <fdidron@users.noreply.github.com>2019-10-01 10:21:12 +0900
commit93f6749e06b70ba81e15f8b77e5a18675dacddfe (patch)
treefcf75ef930800a948e5a3ba015d6759889f2284d /tmk_core/protocol/arm_atsam/clks.h
parentda34bddba16ba7a8495dc30bfe4542551ba87ed4 (diff)
clang-format changes
Diffstat (limited to 'tmk_core/protocol/arm_atsam/clks.h')
-rw-r--r--tmk_core/protocol/arm_atsam/clks.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/tmk_core/protocol/arm_atsam/clks.h b/tmk_core/protocol/arm_atsam/clks.h
index 1b01a1764e..72df3a8e3f 100644
--- a/tmk_core/protocol/arm_atsam/clks.h
+++ b/tmk_core/protocol/arm_atsam/clks.h
@@ -20,20 +20,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef MD_BOOTLOADER
-//From keyboard
-#include "config_led.h"
-#include "config.h"
+// From keyboard
+# include "config_led.h"
+# include "config.h"
-#endif //MD_BOOTLOADER
+#endif // MD_BOOTLOADER
-#define PLL_RATIO 47 //mcu frequency ((X+1)MHz)
-#define FREQ_DFLL_DEFAULT 48000000 //DFLL frequency / usb clock
-#define FREQ_SPI_DEFAULT 1000000 //spi to 595 shift regs
-#define FREQ_I2C0_DEFAULT 100000 //i2c to hub
-#define FREQ_I2C1_DEFAULT I2C_HZ //i2c to LED drivers
-#define FREQ_TC45_DEFAULT 1000000 //1 usec resolution
+#define PLL_RATIO 47 // mcu frequency ((X+1)MHz)
+#define FREQ_DFLL_DEFAULT 48000000 // DFLL frequency / usb clock
+#define FREQ_SPI_DEFAULT 1000000 // spi to 595 shift regs
+#define FREQ_I2C0_DEFAULT 100000 // i2c to hub
+#define FREQ_I2C1_DEFAULT I2C_HZ // i2c to LED drivers
+#define FREQ_TC45_DEFAULT 1000000 // 1 usec resolution
-//I2C1 Set ~Result PWM Time (2x Drivers)
+// I2C1 Set ~Result PWM Time (2x Drivers)
// 1000000 1090000
// 900000 1000000 3.82ms
// 800000 860000
@@ -42,20 +42,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// 580000 615000 6.08ms
// 500000 522000
-#define FREQ_XOSC0 16000000
+#define FREQ_XOSC0 16000000
-#define CHAN_SERCOM_SPI 2 //shift regs
-#define CHAN_SERCOM_I2C0 0 //hub
-#define CHAN_SERCOM_I2C1 1 //led drivers
-#define CHAN_SERCOM_UART 3 //debug util
+#define CHAN_SERCOM_SPI 2 // shift regs
+#define CHAN_SERCOM_I2C0 0 // hub
+#define CHAN_SERCOM_I2C1 1 // led drivers
+#define CHAN_SERCOM_UART 3 // debug util
-//Generator clock channels
-#define GEN_DPLL0 0
-#define GEN_OSC0 1
-#define GEN_TC45 2
+// Generator clock channels
+#define GEN_DPLL0 0
+#define GEN_OSC0 1
+#define GEN_TC45 2
#define SERCOM_COUNT 5
-#define GCLK_COUNT 12
+#define GCLK_COUNT 12
typedef struct clk_s {
uint32_t freq_dfll;
@@ -70,20 +70,20 @@ typedef struct clk_s {
uint32_t freq_adc0;
} clk_t;
-extern volatile clk_t system_clks;
+extern volatile clk_t system_clks;
extern volatile uint64_t ms_clk;
-void CLK_oscctrl_init(void);
-void CLK_reset_time(void);
+void CLK_oscctrl_init(void);
+void CLK_reset_time(void);
uint32_t CLK_set_gclk_freq(uint8_t gclkn, uint32_t freq);
uint32_t CLK_enable_timebase(void);
uint64_t timer_read64(void);
-void CLK_delay_us(uint32_t usec);
-void CLK_delay_ms(uint64_t msec);
+void CLK_delay_us(uint32_t usec);
+void CLK_delay_ms(uint64_t msec);
uint32_t CLK_set_spi_freq(uint8_t sercomn, uint32_t freq);
uint32_t CLK_set_i2c0_freq(uint8_t sercomn, uint32_t freq);
uint32_t CLK_set_i2c1_freq(uint8_t sercomn, uint32_t freq);
-void CLK_init(void);
+void CLK_init(void);
-#endif // _CLKS_H_
+#endif // _CLKS_H_