diff options
author | jaseg <git@jaseg.de> | 2020-12-20 15:18:02 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2020-12-20 15:18:02 +0100 |
commit | 94f94260ace13688285fc8c62687079b26c18854 (patch) | |
tree | 4691249052e28be4d3515c6d2ed4b40545c21ea7 /fw/midi-dials/Inc/curelib_inc | |
parent | 3559d845d29272050d4d44e18e0bb84e676e48ff (diff) | |
download | minikbd-94f94260ace13688285fc8c62687079b26c18854.tar.gz minikbd-94f94260ace13688285fc8c62687079b26c18854.tar.bz2 minikbd-94f94260ace13688285fc8c62687079b26c18854.zip |
Submodule-cache WIP
Diffstat (limited to 'fw/midi-dials/Inc/curelib_inc')
-rw-r--r-- | fw/midi-dials/Inc/curelib_inc/curebuffer.h | 76 | ||||
-rw-r--r-- | fw/midi-dials/Inc/curelib_inc/curemisc.h | 49 |
2 files changed, 0 insertions, 125 deletions
diff --git a/fw/midi-dials/Inc/curelib_inc/curebuffer.h b/fw/midi-dials/Inc/curelib_inc/curebuffer.h deleted file mode 100644 index 2802c61..0000000 --- a/fw/midi-dials/Inc/curelib_inc/curebuffer.h +++ /dev/null @@ -1,76 +0,0 @@ -/*
- *******************************************************************************
- * [curebuffer.h]
- * This module is for FIFO buffer.
- *
- * This program is under the terms of the GPLv3.
- * https://www.gnu.org/licenses/gpl-3.0.html
- *
- * Copyright(c) 2017 Keshikan (www.keshikan.net)
- *******************************************************************************
- */
-
-#ifndef CUREBUFFER_H_
-#define CUREBUFFER_H_
-
-#include <stdint.h>
-
-typedef enum{
- BUFFER_FAILURE,BUFFER_SUCCESS
-}BUFFER_STATUS;
-
-typedef struct{
- uint16_t idx_front;
- uint16_t idx_rear;
- uint16_t length;
- uint8_t *buffer;
-}RingBufferU8;
-
-typedef struct{
- uint16_t idx_front;
- uint16_t idx_rear;
- uint16_t length;
- int16_t *buffer;
-}RingBuffer16;
-
-typedef struct{
- uint16_t idx_front;
- uint16_t idx_rear;
- uint16_t length;
- uint32_t *buffer;
-}RingBuffer32;
-
-
-/////////////////////////////
-//methods for uint8_t FIFO.
-/////////////////////////////
-extern BUFFER_STATUS cureRingBufferU8Init(RingBufferU8 *rbuf, uint16_t buflen);
-extern BUFFER_STATUS cureRingBufferU8Free(RingBufferU8 *rbuf);
-extern BUFFER_STATUS cureRingBufferU8Enqueue(RingBufferU8 *rbuf, uint8_t *inputc);
-extern BUFFER_STATUS cureRingBufferU8Dequeue(RingBufferU8 *rbuf, uint8_t *ret);
-
-/////////////////////////////
-//methods for int16_t FIFO.
-/////////////////////////////
-extern BUFFER_STATUS cureRingBuffer16Init(RingBuffer16 *rbuf, uint16_t buflen);
-extern BUFFER_STATUS cureRingBuffer16Free(RingBuffer16 *rbuf);
-extern BUFFER_STATUS cureRingBuffer16Enqueue(RingBuffer16 *rbuf, int16_t *inputc);
-extern BUFFER_STATUS cureRingBuffer16EnqueueIgnoreErr(RingBuffer16 *rbuf, int16_t *inputc);
-extern BUFFER_STATUS cureRingBuffer16Dequeue(RingBuffer16 *rbuf, int16_t *ret);
-extern BUFFER_STATUS cureRingBuffer16GetElement(RingBuffer16 *rbuf, int16_t *ret, uint16_t delaynum, uint16_t length);
-
-/////////////////////////////
-//methods for uint32_t FIFO.
-/////////////////////////////
-extern BUFFER_STATUS cureRingBufferU32Init(RingBuffer32 *rbuf, uint16_t buflen);
-extern BUFFER_STATUS cureRingBufferU32Free(RingBuffer32 *rbuf);
-extern BUFFER_STATUS cureRingBufferU32Enqueue(RingBuffer32 *rbuf, uint32_t *inputc);
-extern BUFFER_STATUS cureRingBufferU32EnqueueIgnoreErr(RingBuffer32 *rbuf, uint32_t *inputc);
-extern BUFFER_STATUS cureRingBufferU32Dequeue(RingBuffer32 *rbuf, uint32_t *ret);
-extern BUFFER_STATUS cureRingBufferU32GetElement(RingBuffer32 *rbuf, uint32_t *ret, uint16_t delaynum, uint16_t delay_buffer_length);
-
-
-//debug
-extern uint16_t _cureRingBufferU8GetUsedSize(RingBufferU8 *rbuf);
-
-#endif /* CUREBUFFER_H_ */
diff --git a/fw/midi-dials/Inc/curelib_inc/curemisc.h b/fw/midi-dials/Inc/curelib_inc/curemisc.h deleted file mode 100644 index 5c924e2..0000000 --- a/fw/midi-dials/Inc/curelib_inc/curemisc.h +++ /dev/null @@ -1,49 +0,0 @@ -/*
- *******************************************************************************
- * [curemisc.h]
- *
- * This program is under the terms of the GPLv3.
- * https://www.gnu.org/licenses/gpl-3.0.html
- *
- * Copyright(c) 2017 Keshikan (www.keshikan.net)
- *******************************************************************************
- */
-
-#ifndef _CUREMISC_H_
-#define _CUREMISC_H_
-
-
-#include <stdbool.h>
-#include <stdint.h>
-
-
-#ifndef BOOL
- #define BOOL bool
- #define TRUE true
- #define FALSE false
-#endif
-
-
-//LO(HI)WORD: return lower(higher) 16bit of 32bit
-//LO(HI)BYTE: return lower(higher) 4bit of 8bit
-#ifndef LOWORD
- #define LOWORD(n) ( (uint16_t)(n) )
-#endif
-
-#ifndef HIWORD
- #define HIWORD(n) ( (uint16_t)(((uint32_t)(n) >> 16) & 0xFFFF) )
-#endif
-
-#ifndef LOBYTE
- #define LOBYTE(n) ( ((uint8_t)(n)) & 0x0F )
-#endif
-
-#ifndef HIBYTE
- #define HIBYTE(n) ( (uint8_t)(((n) >> 4) & 0x0F) )
-#endif
-
-typedef enum{
- FUNC_ERROR,FUNC_SUCCESS
-}FUNC_STATUS;
-
-#endif
|