Clean up section comments

This commit is contained in:
Scott Lahteine
2019-07-09 22:30:06 -05:00
parent a23021b823
commit 056efaba91
51 changed files with 307 additions and 851 deletions

View File

@ -38,44 +38,15 @@
#endif
#endif
// --------------------------------------------------------------------------
// Externals
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Local defines
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Types
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Variables
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ------------------------
// Public Variables
// --------------------------------------------------------------------------
// ------------------------
uint16_t HAL_adc_result;
// --------------------------------------------------------------------------
// Private Variables
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Function prototypes
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Private functions
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ------------------------
// Public functions
// --------------------------------------------------------------------------
// ------------------------
// Needed for DELAY_NS() / DELAY_US() on CORTEX-M7
#if (defined(__arm__) || defined(__thumb__)) && __CORTEX_M == 7
@ -129,9 +100,9 @@ extern "C" {
extern unsigned int _ebss; // end of bss section
}
// --------------------------------------------------------------------------
// ------------------------
// ADC
// --------------------------------------------------------------------------
// ------------------------
void HAL_adc_start_conversion(const uint8_t adc_pin) {
HAL_adc_result = analogRead(adc_pin);

View File

@ -24,10 +24,6 @@
#define CPU_32_BIT
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include "../../core/macros.h"
#include "../shared/Marduino.h"
#include "../shared/math_32bit.h"
@ -43,9 +39,9 @@
#include <USBSerial.h>
#endif
// --------------------------------------------------------------------------
// ------------------------
// Defines
// --------------------------------------------------------------------------
// ------------------------
#if SERIAL_PORT == 0
#error "Serial port 0 does not exist"
@ -128,24 +124,24 @@
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*(addr))
// --------------------------------------------------------------------------
// ------------------------
// Types
// --------------------------------------------------------------------------
// ------------------------
typedef int16_t pin_t;
#define HAL_SERVO_LIB libServo
// --------------------------------------------------------------------------
// ------------------------
// Public Variables
// --------------------------------------------------------------------------
// ------------------------
/** result of last ADC conversion */
extern uint16_t HAL_adc_result;
// --------------------------------------------------------------------------
// ------------------------
// Public functions
// --------------------------------------------------------------------------
// ------------------------
// Memory related
#define __bss_end __bss_end__

View File

@ -23,35 +23,31 @@
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include "../../inc/MarlinConfig.h"
#include <SPI.h>
// --------------------------------------------------------------------------
// ------------------------
// Public Variables
// --------------------------------------------------------------------------
// ------------------------
static SPISettings spiConfig;
// --------------------------------------------------------------------------
// ------------------------
// Public functions
// --------------------------------------------------------------------------
// ------------------------
#if ENABLED(SOFTWARE_SPI)
// --------------------------------------------------------------------------
// ------------------------
// Software SPI
// --------------------------------------------------------------------------
// ------------------------
#error "Software SPI not supported for STM32. Use Hardware SPI."
#else
// --------------------------------------------------------------------------
// ------------------------
// Hardware SPI
// --------------------------------------------------------------------------
// ------------------------
/**
* VGPV SPI speed start and PCLK2/2, by default 108/2 = 54Mhz

View File

@ -22,50 +22,27 @@
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include "HAL.h"
#include "HAL_timers_STM32.h"
// --------------------------------------------------------------------------
// Externals
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ------------------------
// Local defines
// --------------------------------------------------------------------------
// ------------------------
#define NUM_HARDWARE_TIMERS 2
//#define PRESCALER 1
// --------------------------------------------------------------------------
// Types
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Public Variables
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ------------------------
// Private Variables
// --------------------------------------------------------------------------
// ------------------------
stm32f4_timer_t TimerHandle[NUM_HARDWARE_TIMERS];
// --------------------------------------------------------------------------
// Function prototypes
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Private functions
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ------------------------
// Public functions
// --------------------------------------------------------------------------
// ------------------------
bool timers_initialized[NUM_HARDWARE_TIMERS] = { false };

View File

@ -21,16 +21,12 @@
*/
#pragma once
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include <stdint.h>
#include "../../inc/MarlinConfig.h"
// --------------------------------------------------------------------------
// ------------------------
// Defines
// --------------------------------------------------------------------------
// ------------------------
#define FORCE_INLINE __attribute__((always_inline)) inline
@ -128,21 +124,21 @@ extern void Temp_Handler(stimer_t *htim);
#define HAL_STEP_TIMER_ISR() void Step_Handler(stimer_t *htim)
#define HAL_TEMP_TIMER_ISR() void Temp_Handler(stimer_t *htim)
// --------------------------------------------------------------------------
// ------------------------
// Types
// --------------------------------------------------------------------------
// ------------------------
typedef stimer_t stm32f4_timer_t;
// --------------------------------------------------------------------------
// ------------------------
// Public Variables
// --------------------------------------------------------------------------
// ------------------------
extern stm32f4_timer_t TimerHandle[];
// --------------------------------------------------------------------------
// ------------------------
// Public functions
// --------------------------------------------------------------------------
// ------------------------
void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency);
void HAL_timer_enable_interrupt(const uint8_t timer_num);

View File

@ -27,21 +27,21 @@
* These use GPIO register access for fast port manipulation.
*/
// --------------------------------------------------------------------------
// ------------------------
// Public Variables
// --------------------------------------------------------------------------
// ------------------------
extern GPIO_TypeDef * FastIOPortMap[];
// --------------------------------------------------------------------------
// ------------------------
// Public functions
// --------------------------------------------------------------------------
// ------------------------
void FastIO_init(); // Must be called before using fast io macros
// --------------------------------------------------------------------------
// ------------------------
// Defines
// --------------------------------------------------------------------------
// ------------------------
#define _BV32(b) (1UL << (b))