/* Copyright (C) 2011-2020, Dirk Krause SPDX-License-Identifier: BSD-3-Clause */ /* WARNING: This file was generated by the dkct program (see http://dktools.sourceforge.net/ for details). Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: dk3bits.ctr */ /** @file dk3bits.c The dk3bits module. */ #line 29 "dk3bits.ctr" #include "dk3conf.h" #include "dk3types.h" #include "dk3bits.h" /** Masks to set and retrieve single bits. */ static unsigned short const dk3bits_values[] = { 0x0001U, 0x0002U, 0x0004U, 0x0008U, 0x0010U, 0x0020U, 0x0040U, 0x0080U, 0x0100U, 0x0200U, 0x0400U, 0x0800U, 0x1000U, 0x2000U, 0x4000U, 0x8000U }; unsigned short dk3bits_get(size_t i) { unsigned short back = 0U; if(i < 16) { back = dk3bits_values[i]; } return back; }