I am trying to set up UART on a LPC54102J512BD64, when I try to call RingBuffer_init, Chip_UART_SendRB or Chip_UART_ClearStatus I get the error "No Mathcing function for call to 'RingBuffer_Init' etc. There appears to be errors in ring_buffer.h and uart_5410x.h but I cannot edit these headers. Why would this be happening and how can I fix it? Thank you for any help!
Include files define the interface, you still need to add the actual code providing the functions, either with source or libraries added to your project.
Add the code, then the linker might be able to find the functions.
Thank you for responding :)
I used "manage run-time environment" to include the drivers which I am trying to use so I assumed that it would add any libraries and source code that I need?
There is an error in "ring_buffer.h": "Unknown type name '__STATIC_INLINE', when "UART_5410x.h" tries to inlcide "ring_buffer.h" it produces the error: "error in include chain(ring_buffer.h)"
Could these errors result in main being unable to find the function?
I think I may have misunderstood the error and just have not been passing the right variables into the function.
The function:
int RingBuffer_Init(RINGBUFF_T *RingBuff, void *buffer, int itemSize, int count, void *(*cpyFunc)(void *dst, const void *src, uint32_t len));
I do not know what to pass for the last line?
void *(*cpyFunc)(void *dst, const void *src, uint32_t len));
It is looking for a C function pointer, for a memcpy() type function.
Review how the C qsort() function takes compares, it's covered in K&R, fundamental C method.
Oh, OK thank you! :)
I did not recognise:
as a function. It makes a lot more sense now!