Commit Graph

3 Commits

Author SHA1 Message Date
Noralf Trønnes 5d5d14709f Add clock representation with calibration
Add a python representation of the clocks with the possibility to change
the calbration of clock sources.
2018-05-07 23:04:02 +02:00
Noralf Trønnes 4adba51569 atmel-samd/samd21: Rework clock setup
Make clock setup explicit instead of using the convoluted asf4 macro setup.

enable_clock_generator():
- Add GCLK_GENCTRL_OE to stick with the current setup.
- Handle divisor larger than 31 for generator 2
- Change the source argument so it can take the GCLK_GENCTRL_SRC_XXXX_Val
  macros without casting to uint8_t.

This patch should not introduce any functional changes except keeping
GCLK_GENCTRL_OE enabled when the I2S clock is enabled.
2018-05-05 18:01:13 +02:00
Noralf Trønnes 4a2a553647 atmel-samd/clocks: Split out samd21_clocks.c and samd51_clocks.c
Enhance readability by separating the samd21 and samd51 clock code.

This patch should not introduce any functional changes.
2018-05-04 13:32:56 +02:00