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

@@ -45,9 +45,9 @@
*****************************************************************************/
#pragma once
// --------------------------------------------------------------------------
// ------------------------
// Includes
// --------------------------------------------------------------------------
// ------------------------
#include "../../../inc/MarlinConfig.h"
#include "../HAL.h"

View File

@@ -26,58 +26,30 @@
#include "../../inc/MarlinConfig.h"
// --------------------------------------------------------------------------
// ------------------------
// Includes
// --------------------------------------------------------------------------
// ------------------------
#include "HAL.h"
#include "EEPROM_Emul/eeprom_emul.h"
// --------------------------------------------------------------------------
// Externals
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ------------------------
// Local defines
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Types
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Variables
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Public Variables
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Private Variables
// --------------------------------------------------------------------------
static bool eeprom_initialized = false;
// --------------------------------------------------------------------------
// Function prototypes
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Private functions
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Public functions
// --------------------------------------------------------------------------
// ------------------------
// FLASH_FLAG_PGSERR (Programming Sequence Error) was renamed to
// FLASH_FLAG_ERSERR (Erasing Sequence Error) in STM32F7
#define FLASH_FLAG_PGSERR FLASH_FLAG_ERSERR
// --------------------------------------------------------------------------
// EEPROM
// --------------------------------------------------------------------------
// ------------------------
// Private Variables
// ------------------------
static bool eeprom_initialized = false;
// ------------------------
// Public functions
// ------------------------
void eeprom_init() {
if (!eeprom_initialized) {

View File

@@ -23,51 +23,19 @@
#ifdef STM32F7
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include "HAL.h"
//#include <Wire.h>
// --------------------------------------------------------------------------
// Externals
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Local defines
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Types
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Variables
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ------------------------
// Public Variables
// --------------------------------------------------------------------------
// ------------------------
uint16_t HAL_adc_result;
// --------------------------------------------------------------------------
// Private Variables
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Function prototypes
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Private functions
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ------------------------
// Public functions
// --------------------------------------------------------------------------
// ------------------------
/* VGPV Done with defines
// disable interrupts
@@ -124,9 +92,9 @@ extern "C" {
}
*/
// --------------------------------------------------------------------------
// ------------------------
// ADC
// --------------------------------------------------------------------------
// ------------------------
void HAL_adc_start_conversion(const uint8_t adc_pin) {
HAL_adc_result = analogRead(adc_pin);

View File

@@ -28,10 +28,6 @@
#define vsnprintf_P vsnprintf
#endif
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include <stdint.h>
#include "../shared/Marduino.h"
@@ -45,9 +41,9 @@
#include "../../inc/MarlinConfigPre.h"
// --------------------------------------------------------------------------
// ------------------------
// Defines
// --------------------------------------------------------------------------
// ------------------------
//Serial override
//extern HalSerial usb_serial;
@@ -125,22 +121,22 @@
#undef pgm_read_ptr
#define pgm_read_ptr(addr) (*(addr))
// --------------------------------------------------------------------------
// ------------------------
// Types
// --------------------------------------------------------------------------
// ------------------------
typedef int8_t pin_t;
// --------------------------------------------------------------------------
// ------------------------
// Public Variables
// --------------------------------------------------------------------------
// ------------------------
/** result of last ADC conversion */
extern uint16_t HAL_adc_result;
// --------------------------------------------------------------------------
// ------------------------
// Public functions
// --------------------------------------------------------------------------
// ------------------------
// Memory related
#define __bss_end __bss_end__

View File

@@ -32,10 +32,6 @@
#ifdef STM32F7
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include "HAL.h"
#include "../shared/HAL_SPI.h"
#include <pins_arduino.h>
@@ -43,27 +39,27 @@
#include "../../core/macros.h"
#include <SPI.h>
// --------------------------------------------------------------------------
// ------------------------
// Public Variables
// --------------------------------------------------------------------------
// ------------------------
static SPISettings spiConfig;
// --------------------------------------------------------------------------
// ------------------------
// Public functions
// --------------------------------------------------------------------------
// ------------------------
#if ENABLED(SOFTWARE_SPI)
// --------------------------------------------------------------------------
// ------------------------
// Software SPI
// --------------------------------------------------------------------------
// ------------------------
#error "Software SPI not supported for STM32F7. Use hardware SPI."
#else
// --------------------------------------------------------------------------
// ------------------------
// Hardware SPI
// --------------------------------------------------------------------------
// ------------------------
/**
* VGPV SPI speed start and F_CPU/2, by default 72/2 = 36Mhz

View File

@@ -22,51 +22,26 @@
#ifdef STM32F7
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include "HAL.h"
#include "HAL_timers_STM32F7.h"
// --------------------------------------------------------------------------
// Externals
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ------------------------
// Local defines
// --------------------------------------------------------------------------
// ------------------------
#define NUM_HARDWARE_TIMERS 2
//#define PRESCALER 1
// --------------------------------------------------------------------------
// Types
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Public Variables
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ------------------------
// Private Variables
// --------------------------------------------------------------------------
// ------------------------
tTimerConfig timerConfig[NUM_HARDWARE_TIMERS];
// --------------------------------------------------------------------------
// Function prototypes
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// Private functions
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// ------------------------
// Public functions
// --------------------------------------------------------------------------
// ------------------------
bool timers_initialized[NUM_HARDWARE_TIMERS] = {false};

View File

@@ -21,15 +21,11 @@
*/
#pragma once
// --------------------------------------------------------------------------
// Includes
// --------------------------------------------------------------------------
#include <stdint.h>
// --------------------------------------------------------------------------
// ------------------------
// Defines
// --------------------------------------------------------------------------
// ------------------------
#define FORCE_INLINE __attribute__((always_inline)) inline
@@ -69,9 +65,9 @@ extern void TC7_Handler();
#define HAL_STEP_TIMER_ISR() void TC5_Handler()
#define HAL_TEMP_TIMER_ISR() void TC7_Handler()
// --------------------------------------------------------------------------
// ------------------------
// Types
// --------------------------------------------------------------------------
// ------------------------
typedef struct {
TIM_HandleTypeDef timerdef;
@@ -79,15 +75,15 @@ typedef struct {
uint32_t callback;
} tTimerConfig;
// --------------------------------------------------------------------------
// ------------------------
// Public Variables
// --------------------------------------------------------------------------
// ------------------------
//extern const tTimerConfig timerConfig[];
// --------------------------------------------------------------------------
// ------------------------
// 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);