summaryrefslogtreecommitdiff
path: root/shared-bindings/bitops/__init__.h
diff options
context:
space:
mode:
authorJeff Epler <jeff@adafruit.com>2021-02-18 20:29:05 -0600
committerGitHub <noreply@github.com>2021-02-18 20:29:05 -0600
commit1cd4e4552e1a72c61a787c2fa0b8d51a7cf1301f (patch)
tree58d5a81dd3753458f2cb9d4d6fddcf89ebc43c66 /shared-bindings/bitops/__init__.h
parent0ecb24c3e56c64c11265611ec174950b18fce8bf (diff)
parentb854c06a0ca31e97b4c6998ff8ef5b314ebf49e4 (diff)
Merge pull request #4219 from jepler/bit_transpose
Add Bit transpose function to support piopixl8
Diffstat (limited to 'shared-bindings/bitops/__init__.h')
-rw-r--r--shared-bindings/bitops/__init__.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/shared-bindings/bitops/__init__.h b/shared-bindings/bitops/__init__.h
new file mode 100644
index 000000000..6654cac5e
--- /dev/null
+++ b/shared-bindings/bitops/__init__.h
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the Circuit Python project, https://github.com/adafruit/circuitpython
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2021 Jeff Epler
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#pragma once
+
+#include <stdint.h>
+#include <stdlib.h>
+
+void common_hal_bitops_bit_transpose(uint8_t *result, const uint8_t *src, size_t inlen, size_t num_strands);