init
This commit is contained in:
Executable
+52
@@ -0,0 +1,52 @@
|
||||
// Platform setup ------------------------------------------------------------------------------------
|
||||
#pragma once
|
||||
|
||||
// 1/100 second resolution
|
||||
#define HAL_FRACTIONAL_SEC 100.0F
|
||||
|
||||
// This platform has 8 bit PWM
|
||||
#ifndef HAL_VCC
|
||||
#define HAL_VCC 3.3F
|
||||
#endif
|
||||
#ifndef ANALOG_READ_RANGE
|
||||
#define ANALOG_READ_RANGE 1023 // always use 2^n - 1, within the platform's limits
|
||||
#else
|
||||
#error "Configuration (Config.h): ANALOG_READ_RANGE can't be changed on this platform"
|
||||
#endif
|
||||
#ifndef ANALOG_WRITE_RANGE
|
||||
#define ANALOG_WRITE_RANGE 255 // always use 2^n - 1, within the platform's limits
|
||||
#else
|
||||
#error "Configuration (Config.h): ANALOG_WRITE_RANGE can't be changed on this platform"
|
||||
#endif
|
||||
|
||||
// Lower limit (fastest) step rate in us for this platform (in SQW mode) and width of step pulse
|
||||
#define HAL_MAXRATE_LOWER_LIMIT 76.8
|
||||
#define HAL_PULSE_WIDTH 10000 // in ns, estimated
|
||||
|
||||
// New symbol for the default I2C port -------------------------------------------------------------
|
||||
#include <Wire.h>
|
||||
#ifndef HAL_WIRE
|
||||
#define HAL_WIRE Wire
|
||||
#endif
|
||||
#ifndef HAL_WIRE_CLOCK
|
||||
#define HAL_WIRE_CLOCK 100000
|
||||
#endif
|
||||
|
||||
// Non-volatile storage ----------------------------------------------------------------------------
|
||||
#if NV_DRIVER == NV_DEFAULT
|
||||
#undef NV_DRIVER
|
||||
#define NV_DRIVER NV_AT24C32
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// Internal MCU temperature (in degrees C)
|
||||
#define HAL_TEMP() ( NAN )
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
// General purpose initialize for HAL
|
||||
|
||||
// MCU reset
|
||||
#define HAL_RESET() (*((volatile uint32_t*)(PPB_BASE + 0x0ED0C))) = 0x5FA0004;
|
||||
|
||||
//---------------------------------------------------------------------------------------------------
|
||||
// Misc. includes to support this processor's operation
|
||||
Reference in New Issue
Block a user