/*
 * Copyright (c) 2014, Kevin Läufer
 * Copyright (c) 2014, Niklas Hauser
 *
 * This file is part of the modm project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
// ----------------------------------------------------------------------------

#ifndef MODM_BIT_CONSTANTS_HPP
#define MODM_BIT_CONSTANTS_HPP

#include <stdint.h>

namespace modm
{

/// @ingroup modm_math_utils
/// @{

constexpr uint8_t  Bit0  = uint8_t(1) << 0;
constexpr uint8_t  Bit1  = uint8_t(1) << 1;
constexpr uint8_t  Bit2  = uint8_t(1) << 2;
constexpr uint8_t  Bit3  = uint8_t(1) << 3;
constexpr uint8_t  Bit4  = uint8_t(1) << 4;
constexpr uint8_t  Bit5  = uint8_t(1) << 5;
constexpr uint8_t  Bit6  = uint8_t(1) << 6;
constexpr uint8_t  Bit7  = uint8_t(1) << 7;

constexpr uint16_t Bit8  = uint16_t(1) <<  8;
constexpr uint16_t Bit9  = uint16_t(1) <<  9;
constexpr uint16_t Bit10 = uint16_t(1) << 10;
constexpr uint16_t Bit11 = uint16_t(1) << 11;
constexpr uint16_t Bit12 = uint16_t(1) << 12;
constexpr uint16_t Bit13 = uint16_t(1) << 13;
constexpr uint16_t Bit14 = uint16_t(1) << 14;
constexpr uint16_t Bit15 = uint16_t(1) << 15;

constexpr uint32_t Bit16 = uint32_t(1) << 16;
constexpr uint32_t Bit17 = uint32_t(1) << 17;
constexpr uint32_t Bit18 = uint32_t(1) << 18;
constexpr uint32_t Bit19 = uint32_t(1) << 19;
constexpr uint32_t Bit20 = uint32_t(1) << 20;
constexpr uint32_t Bit21 = uint32_t(1) << 21;
constexpr uint32_t Bit22 = uint32_t(1) << 22;
constexpr uint32_t Bit23 = uint32_t(1) << 23;
constexpr uint32_t Bit24 = uint32_t(1) << 24;
constexpr uint32_t Bit25 = uint32_t(1) << 25;
constexpr uint32_t Bit26 = uint32_t(1) << 26;
constexpr uint32_t Bit27 = uint32_t(1) << 27;
constexpr uint32_t Bit28 = uint32_t(1) << 28;
constexpr uint32_t Bit29 = uint32_t(1) << 29;
constexpr uint32_t Bit30 = uint32_t(1) << 30;
constexpr uint32_t Bit31 = uint32_t(1) << 31;

constexpr uint64_t Bit32 = uint64_t(1) << 32;
constexpr uint64_t Bit33 = uint64_t(1) << 33;
constexpr uint64_t Bit34 = uint64_t(1) << 34;
constexpr uint64_t Bit35 = uint64_t(1) << 35;
constexpr uint64_t Bit36 = uint64_t(1) << 36;
constexpr uint64_t Bit37 = uint64_t(1) << 37;
constexpr uint64_t Bit38 = uint64_t(1) << 38;
constexpr uint64_t Bit39 = uint64_t(1) << 39;
constexpr uint64_t Bit40 = uint64_t(1) << 40;
constexpr uint64_t Bit41 = uint64_t(1) << 41;
constexpr uint64_t Bit42 = uint64_t(1) << 42;
constexpr uint64_t Bit43 = uint64_t(1) << 43;
constexpr uint64_t Bit44 = uint64_t(1) << 44;
constexpr uint64_t Bit45 = uint64_t(1) << 45;
constexpr uint64_t Bit46 = uint64_t(1) << 46;
constexpr uint64_t Bit47 = uint64_t(1) << 47;
constexpr uint64_t Bit48 = uint64_t(1) << 48;
constexpr uint64_t Bit49 = uint64_t(1) << 49;
constexpr uint64_t Bit50 = uint64_t(1) << 50;
constexpr uint64_t Bit51 = uint64_t(1) << 51;
constexpr uint64_t Bit52 = uint64_t(1) << 52;
constexpr uint64_t Bit53 = uint64_t(1) << 53;
constexpr uint64_t Bit54 = uint64_t(1) << 54;
constexpr uint64_t Bit55 = uint64_t(1) << 55;
constexpr uint64_t Bit56 = uint64_t(1) << 56;
constexpr uint64_t Bit57 = uint64_t(1) << 57;
constexpr uint64_t Bit58 = uint64_t(1) << 58;
constexpr uint64_t Bit59 = uint64_t(1) << 59;
constexpr uint64_t Bit60 = uint64_t(1) << 60;
constexpr uint64_t Bit61 = uint64_t(1) << 61;
constexpr uint64_t Bit62 = uint64_t(1) << 62;
constexpr uint64_t Bit63 = uint64_t(1) << 63;

/// @}

};	// namespace modm

#endif	// MODM_BIT_CONSTANTS_HPP
