Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: UAVCAN UAVCAN_Subscriber
Diff: libuavcan_drivers/lpc11c24/driver/src/internal.hpp
- Revision:
- 0:dfe6edabb8ec
diff -r 000000000000 -r dfe6edabb8ec libuavcan_drivers/lpc11c24/driver/src/internal.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libuavcan_drivers/lpc11c24/driver/src/internal.hpp Sat Apr 14 10:25:32 2018 +0000 @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com> + */ + +#pragma once + +#include <cstdint> +#include <chip.h> + +/* + * Compiler version check + */ +#ifdef __GNUC__ +# if (__GNUC__ * 10 + __GNUC_MINOR__) < 49 +# error "Use GCC 4.9 or newer" +# endif +#endif + + +namespace uavcan_lpc11c24 +{ + +/** + * Locks UAVCAN driver interrupts. + * TODO: priority. + */ +struct CriticalSectionLocker +{ + CriticalSectionLocker() + { + __disable_irq(); + } + ~CriticalSectionLocker() + { + __enable_irq(); + } +}; + +/** + * Internal for the driver + */ +namespace clock +{ + +std::uint64_t getUtcUSecFromCanInterrupt(); + +} + +}