
How about a figure-8 mono coil?

It gets rid of the EMI-noise by design.
















Implement a FIFO buffer in ANSI C for floating-point numbers. FIFO stands for First In First Out buffer and can be of arbitrary length. It will be written to and read from in blocks. No single values will be handled. The floating-point numbers should be typecast as REAL. Create a FIFO type for internal data. A function for `int FIFO_Init(FIFO *pFF, int nBuffer)`, where `pFF` is a pointer to the FIFO object and `nBuffer` is the number of floating-point numbers (buffer length). A function for `int FIFO_Reset(FIFO *pFF)` to reset the buffer when no data is present. A function for `int FIFO_GetSize(FIFO *pFF)` to determine the number of data items in the FIFO buffer. The return value is an integer. A function for `int FIFO_Write(FIFO *pFF, int nBuffer, REAL *pBuf)` to write data to the FIFO buffer, where `nBuffer` is the number of data items to write and `pBuf` is the pointer to the floating-point data. The return value should be the number of data items written. A function for `int FIFO_Read(FIFO *pFF, int nBuffer, REAL *pBuf)` to read data from the FIFO buffer, where `nBuffer` is the number of data items to read and `pBuf` is the pointer to the REAL buffer. The return value is the actual number of data items read. A function for `int FIFO_Destroy(FIFO *pFF)` to release all internal resources. Error codes can be included in the return values. Create an include file with type definitions, error codes, and function prototypes. Create an implementation file. Review the implementation, correct any errors, and optimize it for speed.


Comment