qmk_firmware/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h
patrickmt 6e984a8b5e Update to arm_atsam wait and timer routines
Microsecond (us) delays are now handled by a busy wait loop according to MCU frequency. This replaces the system counter method which had an overhead of around 12us.
TC5 device and supporting routines removed as it was the old us delay counter.
wait_ms is now properly a macro to CLK_delay_ms.
wait_us is now properly a macro to CLK_delay_us.
Removed CLK_get_us as it has no use.
All calls to CLK_get_ms() have been replaced by timer_read64() with corrected typing.
All calls to CLK_delay_ms() have been replaced by wait_ms().
All calls to CLK_delay_us() have been replaced by wait_us() and timings verified or updated as needed after review on scope.
Corrected typing of variables using 64bit ms timer readings if needed.
2019-01-07 12:44:55 -08:00

47 lines
1.1 KiB
C

/*
Copyright 2018 Massdrop Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _ARM_ATSAM_PROTOCOL_H_
#define _ARM_ATSAM_PROTOCOL_H_
#include "samd51j18a.h"
#include "md_bootloader.h"
#include "timer.h"
#include "d51_util.h"
#include "clks.h"
#include "wait.h"
#include "adc.h"
#include "i2c_master.h"
#include "spi.h"
#include "./usb/usb2422.h"
#ifndef MD_BOOTLOADER
#include "main_arm_atsam.h"
#include "led_matrix.h"
#include "issi3733_driver.h"
#include "./usb/compiler.h"
#include "./usb/udc.h"
#include "./usb/udi_cdc.h"
#endif //MD_BOOTLOADER
#endif //_ARM_ATSAM_PROTOCOL_H_