Normalize includes
This commit is contained in:
parent
3e904a2e71
commit
eb385a113f
11 changed files with 20 additions and 16 deletions
|
@ -8,8 +8,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <f4ll/initialized_singleton.h>
|
#include <f4ll/initialized_singleton.h>
|
||||||
#include <f4ll/packet_usart.h>
|
|
||||||
#include <f4ll/ringbuffer.h>
|
#include <f4ll/ringbuffer.h>
|
||||||
|
#include <f4ll/usart_core.h>
|
||||||
|
|
||||||
|
#include <platform/dma_ll.h>
|
||||||
|
|
||||||
namespace f4ll {
|
namespace f4ll {
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,12 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
|
#include <platform/dma_ll.h>
|
||||||
|
|
||||||
#include <f4ll/dma_helper.h>
|
#include <f4ll/dma_helper.h>
|
||||||
#include <f4ll/initialized_singleton.h>
|
#include <f4ll/initialized_singleton.h>
|
||||||
#include <inttypes.h>
|
|
||||||
#include <platform/dma_ll.h>
|
|
||||||
|
|
||||||
namespace f4ll {
|
namespace f4ll {
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
#include <platform/dma_ll.h>
|
#include <platform/dma_ll.h>
|
||||||
|
|
||||||
namespace f4ll {
|
namespace f4ll {
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
#include <f4ll/dma_helper.h>
|
#include <f4ll/dma_helper.h>
|
||||||
#include <f4ll/initialized_singleton.h>
|
#include <f4ll/initialized_singleton.h>
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ private:
|
||||||
virtual void tx_dma_half_transfer(void) override;
|
virtual void tx_dma_half_transfer(void) override;
|
||||||
virtual void tx_dma_error(dma_helper::dma_error_type reason) override;
|
virtual void tx_dma_error(dma_helper::dma_error_type reason) override;
|
||||||
|
|
||||||
struct Buffer
|
struct buffer
|
||||||
{
|
{
|
||||||
packet pkt;
|
packet pkt;
|
||||||
// transfer area ends here
|
// transfer area ends here
|
||||||
|
@ -115,8 +115,8 @@ private:
|
||||||
crc_handler::slot<2> m_crc_slot;
|
crc_handler::slot<2> m_crc_slot;
|
||||||
ihs_usart_callback *m_user_callback = nullptr;
|
ihs_usart_callback *m_user_callback = nullptr;
|
||||||
uintptr_t m_user_callback_param = 0;
|
uintptr_t m_user_callback_param = 0;
|
||||||
Buffer m_tx_buffer;
|
buffer m_tx_buffer;
|
||||||
Buffer m_rx_buffers[2];
|
buffer m_rx_buffers[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
namespace f4ll {
|
namespace f4ll {
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,7 @@
|
||||||
* Author: abody
|
* Author: abody
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cstddef>
|
|
||||||
#include <f4ll/console_handler.h>
|
#include <f4ll/console_handler.h>
|
||||||
#include <f4ll/irq_lock.h>
|
|
||||||
#include <f4ll/str_util.h>
|
#include <f4ll/str_util.h>
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* -c "tpiu config internal <logfile_full_path> uart off <cpufreq>"
|
* -c "tpiu config internal <logfile_full_path> uart off <cpufreq>"
|
||||||
*/
|
*/
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
// #include <core_cm4.h>
|
|
||||||
#include <f4ll/fault.h>
|
#include <f4ll/fault.h>
|
||||||
#include <f4ll/str_util.h>
|
#include <f4ll/str_util.h>
|
||||||
#include <stm32f4xx.h>
|
#include <stm32f4xx.h>
|
||||||
|
|
|
@ -183,7 +183,7 @@ void packet_usart::crc_succeeded(uintptr_t callback_param, uint32_t crc, uint8_t
|
||||||
{
|
{
|
||||||
(void)task;
|
(void)task;
|
||||||
|
|
||||||
Buffer &buf(m_rx_buffers[static_cast<int>(callback_param)]);
|
buffer &buf(m_rx_buffers[static_cast<int>(callback_param)]);
|
||||||
|
|
||||||
buf.busy = 1;
|
buf.busy = 1;
|
||||||
if (*(uint32_t *)(buf.pkt.payload + round_up_to_4((uint16_t)buf.pkt.header.payload_length)) != crc) {
|
if (*(uint32_t *)(buf.pkt.payload + round_up_to_4((uint16_t)buf.pkt.header.payload_length)) != crc) {
|
||||||
|
@ -201,7 +201,7 @@ void packet_usart::crc_failed(uintptr_t callback_param, uint32_t crc, uint8_t ta
|
||||||
(void)crc;
|
(void)crc;
|
||||||
(void)task;
|
(void)task;
|
||||||
|
|
||||||
Buffer &buf(m_rx_buffers[static_cast<int>(callback_param)]);
|
buffer &buf(m_rx_buffers[static_cast<int>(callback_param)]);
|
||||||
buf.busy = buf.error = true;
|
buf.busy = buf.error = true;
|
||||||
buf.error_info = 0;
|
buf.error_info = 0;
|
||||||
++m_stats.payload_errror;
|
++m_stats.payload_errror;
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include <f4ll/ringbuffer.h>
|
#include <f4ll/ringbuffer.h>
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
namespace f4ll {
|
namespace f4ll {
|
||||||
|
|
||||||
ringbuffer_ext::ringbuffer_ext(uint8_t *bptr, size_type bsize)
|
ringbuffer_ext::ringbuffer_ext(uint8_t *bptr, size_type bsize)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include <f4ll/str_util.h>
|
#include <f4ll/str_util.h>
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
size_t strcpy_ex(char *dst, char const *src)
|
size_t strcpy_ex(char *dst, char const *src)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue