Fixed Bug #857
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_17.6.x@10304 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
7a84e6adab
commit
e2cd3c0799
|
@ -166,23 +166,18 @@
|
|||
#define STM32_UART_USE_USART1 FALSE
|
||||
#define STM32_UART_USE_USART2 FALSE
|
||||
#define STM32_UART_USE_USART3 FALSE
|
||||
#define STM32_UART_USE_UART4 FALSE
|
||||
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART3_IRQ_PRIORITY 3
|
||||
#define STM32_UART_UART4_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART3_8_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART3_DMA_PRIORITY 0
|
||||
#define STM32_UART_UART4_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
||||
#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||
#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||
#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
||||
#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
||||
#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
||||
#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
||||
#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||
#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
||||
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
|
|
|
@ -193,8 +193,11 @@
|
|||
*/
|
||||
#define STM32_SERIAL_USE_USART1 TRUE
|
||||
#define STM32_SERIAL_USE_USART2 FALSE
|
||||
#define STM32_SERIAL_USE_USART3 FALSE
|
||||
#define STM32_SERIAL_USE_UART4 FALSE
|
||||
#define STM32_SERIAL_USART1_PRIORITY 3
|
||||
#define STM32_SERIAL_USART2_PRIORITY 3
|
||||
#define STM32_SERIAL_USART3_8_PRIORITY 3
|
||||
|
||||
/*
|
||||
* SPI driver system settings.
|
||||
|
@ -222,14 +225,23 @@
|
|||
*/
|
||||
#define STM32_UART_USE_USART1 FALSE
|
||||
#define STM32_UART_USE_USART2 FALSE
|
||||
#define STM32_UART_USE_USART3 FALSE
|
||||
#define STM32_UART_USE_UART4 FALSE
|
||||
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART3_8_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART3_DMA_PRIORITY 0
|
||||
#define STM32_UART_UART4_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
||||
#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||
#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||
#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||
#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
||||
#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
||||
#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
||||
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
|
|
|
@ -193,8 +193,11 @@
|
|||
*/
|
||||
#define STM32_SERIAL_USE_USART1 FALSE
|
||||
#define STM32_SERIAL_USE_USART2 TRUE
|
||||
#define STM32_SERIAL_USE_USART3 FALSE
|
||||
#define STM32_SERIAL_USE_UART4 FALSE
|
||||
#define STM32_SERIAL_USART1_PRIORITY 3
|
||||
#define STM32_SERIAL_USART2_PRIORITY 3
|
||||
#define STM32_SERIAL_USART3_8_PRIORITY 3
|
||||
|
||||
/*
|
||||
* SPI driver system settings.
|
||||
|
@ -222,14 +225,23 @@
|
|||
*/
|
||||
#define STM32_UART_USE_USART1 FALSE
|
||||
#define STM32_UART_USE_USART2 FALSE
|
||||
#define STM32_UART_USE_USART3 FALSE
|
||||
#define STM32_UART_USE_UART4 FALSE
|
||||
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART3_8_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART3_DMA_PRIORITY 0
|
||||
#define STM32_UART_UART4_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
||||
#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||
#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||
#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||
#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
||||
#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
||||
#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
||||
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
|
|
|
@ -199,7 +199,7 @@
|
|||
#define STM32_UART_USE_UART8 FALSE
|
||||
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART3_8_PRIORITY 3
|
||||
#define STM32_UART_USART3_8_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART3_DMA_PRIORITY 0
|
||||
|
|
|
@ -113,7 +113,7 @@ CSRC = $(STARTUPSRC) \
|
|||
$(PLATFORMSRC) \
|
||||
$(BOARDSRC) \
|
||||
$(TESTSRC) \
|
||||
usbcfg.c main.c
|
||||
main.c
|
||||
|
||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||
# setting.
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<intAttribute key="org.eclipse.cdt.launch.ATTR_BUILD_BEFORE_LAUNCH_ATTR" value="2"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.COREFILE_PATH" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_REGISTER_GROUPS" value=""/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList/>"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.FORMAT" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?><contentList><content id="null-stm32_clock_init-(format)" val="4"/><content id="mp-stm32_clock_init-(format)" val="2"/></contentList>"/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.GLOBAL_VARIABLES" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <globalVariableList/> "/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.MEMORY_BLOCKS" value="<?xml version="1.0" encoding="UTF-8" standalone="no"?> <memoryBlockExpressionList/> "/>
|
||||
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="./build/ch.elf"/>
|
||||
|
|
|
@ -139,14 +139,14 @@
|
|||
* @brief Enables the SERIAL subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SERIAL FALSE
|
||||
#define HAL_USE_SERIAL TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Enables the SERIAL over USB subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SERIAL_USB TRUE
|
||||
#define HAL_USE_SERIAL_USB FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@ -167,7 +167,7 @@
|
|||
* @brief Enables the USB subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_USB) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_USB TRUE
|
||||
#define HAL_USE_USB FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
#include "ch.h"
|
||||
#include "hal.h"
|
||||
#include "usbcfg.h"
|
||||
|
||||
#include "ch_test.h"
|
||||
|
||||
/*
|
||||
|
@ -52,21 +50,10 @@ int main(void) {
|
|||
chSysInit();
|
||||
|
||||
/*
|
||||
* Initializes a serial-over-USB CDC driver.
|
||||
* Activates the serial driver 1 using the driver default configuration.
|
||||
*/
|
||||
sduObjectInit(&SDU1);
|
||||
sduStart(&SDU1, &serusbcfg);
|
||||
sdStart(&SD1, NULL);
|
||||
|
||||
/*
|
||||
* Activates the USB driver and then the USB bus pull-up on D+.
|
||||
* Note, a delay is inserted in order to not have to disconnect the cable
|
||||
* after a reset.
|
||||
*/
|
||||
usbDisconnectBus(serusbcfg.usbp);
|
||||
chThdSleepMilliseconds(1000);
|
||||
usbStart(serusbcfg.usbp, &usbcfg);
|
||||
usbConnectBus(serusbcfg.usbp);
|
||||
chThdSleepMilliseconds(1000);
|
||||
/*
|
||||
* Creates the blinker thread.
|
||||
*/
|
||||
|
@ -78,7 +65,7 @@ int main(void) {
|
|||
*/
|
||||
while (true) {
|
||||
if (palReadLine(LINE_BUTTON))
|
||||
test_execute((BaseSequentialStream *)&SDU1);
|
||||
test_execute((BaseSequentialStream *)&SD1);
|
||||
chThdSleepMilliseconds(500);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
/*
|
||||
* SERIAL driver system settings.
|
||||
*/
|
||||
#define STM32_SERIAL_USE_USART1 FALSE
|
||||
#define STM32_SERIAL_USE_USART1 TRUE
|
||||
#define STM32_SERIAL_USE_USART2 FALSE
|
||||
#define STM32_SERIAL_USE_LPUART1 FALSE
|
||||
#define STM32_SERIAL_USART1_PRIORITY 3
|
||||
|
@ -172,9 +172,8 @@
|
|||
/*
|
||||
* USB driver system settings.
|
||||
*/
|
||||
#define STM32_USB_USE_USB1 TRUE
|
||||
#define STM32_USB_USE_USB1 FALSE
|
||||
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||||
#define STM32_USB_USB1_HP_IRQ_PRIORITY 2
|
||||
#define STM32_USB_USB1_LP_IRQ_PRIORITY 3
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,342 +0,0 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#include "hal.h"
|
||||
|
||||
/* Virtual serial port over USB.*/
|
||||
SerialUSBDriver SDU1;
|
||||
|
||||
/*
|
||||
* Endpoints to be used for USBD1.
|
||||
*/
|
||||
#define USBD1_DATA_REQUEST_EP 1
|
||||
#define USBD1_DATA_AVAILABLE_EP 1
|
||||
#define USBD1_INTERRUPT_REQUEST_EP 2
|
||||
|
||||
/*
|
||||
* USB Device Descriptor.
|
||||
*/
|
||||
static const uint8_t vcom_device_descriptor_data[18] = {
|
||||
USB_DESC_DEVICE (0x0110, /* bcdUSB (1.1). */
|
||||
0x02, /* bDeviceClass (CDC). */
|
||||
0x00, /* bDeviceSubClass. */
|
||||
0x00, /* bDeviceProtocol. */
|
||||
0x40, /* bMaxPacketSize. */
|
||||
0x0483, /* idVendor (ST). */
|
||||
0x5740, /* idProduct. */
|
||||
0x0200, /* bcdDevice. */
|
||||
1, /* iManufacturer. */
|
||||
2, /* iProduct. */
|
||||
3, /* iSerialNumber. */
|
||||
1) /* bNumConfigurations. */
|
||||
};
|
||||
|
||||
/*
|
||||
* Device Descriptor wrapper.
|
||||
*/
|
||||
static const USBDescriptor vcom_device_descriptor = {
|
||||
sizeof vcom_device_descriptor_data,
|
||||
vcom_device_descriptor_data
|
||||
};
|
||||
|
||||
/* Configuration Descriptor tree for a CDC.*/
|
||||
static const uint8_t vcom_configuration_descriptor_data[67] = {
|
||||
/* Configuration Descriptor.*/
|
||||
USB_DESC_CONFIGURATION(67, /* wTotalLength. */
|
||||
0x02, /* bNumInterfaces. */
|
||||
0x01, /* bConfigurationValue. */
|
||||
0, /* iConfiguration. */
|
||||
0xC0, /* bmAttributes (self powered). */
|
||||
50), /* bMaxPower (100mA). */
|
||||
/* Interface Descriptor.*/
|
||||
USB_DESC_INTERFACE (0x00, /* bInterfaceNumber. */
|
||||
0x00, /* bAlternateSetting. */
|
||||
0x01, /* bNumEndpoints. */
|
||||
0x02, /* bInterfaceClass (Communications
|
||||
Interface Class, CDC section
|
||||
4.2). */
|
||||
0x02, /* bInterfaceSubClass (Abstract
|
||||
Control Model, CDC section 4.3). */
|
||||
0x01, /* bInterfaceProtocol (AT commands,
|
||||
CDC section 4.4). */
|
||||
0), /* iInterface. */
|
||||
/* Header Functional Descriptor (CDC section 5.2.3).*/
|
||||
USB_DESC_BYTE (5), /* bLength. */
|
||||
USB_DESC_BYTE (0x24), /* bDescriptorType (CS_INTERFACE). */
|
||||
USB_DESC_BYTE (0x00), /* bDescriptorSubtype (Header
|
||||
Functional Descriptor. */
|
||||
USB_DESC_BCD (0x0110), /* bcdCDC. */
|
||||
/* Call Management Functional Descriptor. */
|
||||
USB_DESC_BYTE (5), /* bFunctionLength. */
|
||||
USB_DESC_BYTE (0x24), /* bDescriptorType (CS_INTERFACE). */
|
||||
USB_DESC_BYTE (0x01), /* bDescriptorSubtype (Call Management
|
||||
Functional Descriptor). */
|
||||
USB_DESC_BYTE (0x00), /* bmCapabilities (D0+D1). */
|
||||
USB_DESC_BYTE (0x01), /* bDataInterface. */
|
||||
/* ACM Functional Descriptor.*/
|
||||
USB_DESC_BYTE (4), /* bFunctionLength. */
|
||||
USB_DESC_BYTE (0x24), /* bDescriptorType (CS_INTERFACE). */
|
||||
USB_DESC_BYTE (0x02), /* bDescriptorSubtype (Abstract
|
||||
Control Management Descriptor). */
|
||||
USB_DESC_BYTE (0x02), /* bmCapabilities. */
|
||||
/* Union Functional Descriptor.*/
|
||||
USB_DESC_BYTE (5), /* bFunctionLength. */
|
||||
USB_DESC_BYTE (0x24), /* bDescriptorType (CS_INTERFACE). */
|
||||
USB_DESC_BYTE (0x06), /* bDescriptorSubtype (Union
|
||||
Functional Descriptor). */
|
||||
USB_DESC_BYTE (0x00), /* bMasterInterface (Communication
|
||||
Class Interface). */
|
||||
USB_DESC_BYTE (0x01), /* bSlaveInterface0 (Data Class
|
||||
Interface). */
|
||||
/* Endpoint 2 Descriptor.*/
|
||||
USB_DESC_ENDPOINT (USBD1_INTERRUPT_REQUEST_EP|0x80,
|
||||
0x03, /* bmAttributes (Interrupt). */
|
||||
0x0008, /* wMaxPacketSize. */
|
||||
0xFF), /* bInterval. */
|
||||
/* Interface Descriptor.*/
|
||||
USB_DESC_INTERFACE (0x01, /* bInterfaceNumber. */
|
||||
0x00, /* bAlternateSetting. */
|
||||
0x02, /* bNumEndpoints. */
|
||||
0x0A, /* bInterfaceClass (Data Class
|
||||
Interface, CDC section 4.5). */
|
||||
0x00, /* bInterfaceSubClass (CDC section
|
||||
4.6). */
|
||||
0x00, /* bInterfaceProtocol (CDC section
|
||||
4.7). */
|
||||
0x00), /* iInterface. */
|
||||
/* Endpoint 3 Descriptor.*/
|
||||
USB_DESC_ENDPOINT (USBD1_DATA_AVAILABLE_EP, /* bEndpointAddress.*/
|
||||
0x02, /* bmAttributes (Bulk). */
|
||||
0x0040, /* wMaxPacketSize. */
|
||||
0x00), /* bInterval. */
|
||||
/* Endpoint 1 Descriptor.*/
|
||||
USB_DESC_ENDPOINT (USBD1_DATA_REQUEST_EP|0x80, /* bEndpointAddress.*/
|
||||
0x02, /* bmAttributes (Bulk). */
|
||||
0x0040, /* wMaxPacketSize. */
|
||||
0x00) /* bInterval. */
|
||||
};
|
||||
|
||||
/*
|
||||
* Configuration Descriptor wrapper.
|
||||
*/
|
||||
static const USBDescriptor vcom_configuration_descriptor = {
|
||||
sizeof vcom_configuration_descriptor_data,
|
||||
vcom_configuration_descriptor_data
|
||||
};
|
||||
|
||||
/*
|
||||
* U.S. English language identifier.
|
||||
*/
|
||||
static const uint8_t vcom_string0[] = {
|
||||
USB_DESC_BYTE(4), /* bLength. */
|
||||
USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */
|
||||
USB_DESC_WORD(0x0409) /* wLANGID (U.S. English). */
|
||||
};
|
||||
|
||||
/*
|
||||
* Vendor string.
|
||||
*/
|
||||
static const uint8_t vcom_string1[] = {
|
||||
USB_DESC_BYTE(38), /* bLength. */
|
||||
USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */
|
||||
'S', 0, 'T', 0, 'M', 0, 'i', 0, 'c', 0, 'r', 0, 'o', 0, 'e', 0,
|
||||
'l', 0, 'e', 0, 'c', 0, 't', 0, 'r', 0, 'o', 0, 'n', 0, 'i', 0,
|
||||
'c', 0, 's', 0
|
||||
};
|
||||
|
||||
/*
|
||||
* Device Description string.
|
||||
*/
|
||||
static const uint8_t vcom_string2[] = {
|
||||
USB_DESC_BYTE(56), /* bLength. */
|
||||
USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */
|
||||
'C', 0, 'h', 0, 'i', 0, 'b', 0, 'i', 0, 'O', 0, 'S', 0, '/', 0,
|
||||
'R', 0, 'T', 0, ' ', 0, 'V', 0, 'i', 0, 'r', 0, 't', 0, 'u', 0,
|
||||
'a', 0, 'l', 0, ' ', 0, 'C', 0, 'O', 0, 'M', 0, ' ', 0, 'P', 0,
|
||||
'o', 0, 'r', 0, 't', 0
|
||||
};
|
||||
|
||||
/*
|
||||
* Serial Number string.
|
||||
*/
|
||||
static const uint8_t vcom_string3[] = {
|
||||
USB_DESC_BYTE(8), /* bLength. */
|
||||
USB_DESC_BYTE(USB_DESCRIPTOR_STRING), /* bDescriptorType. */
|
||||
'0' + CH_KERNEL_MAJOR, 0,
|
||||
'0' + CH_KERNEL_MINOR, 0,
|
||||
'0' + CH_KERNEL_PATCH, 0
|
||||
};
|
||||
|
||||
/*
|
||||
* Strings wrappers array.
|
||||
*/
|
||||
static const USBDescriptor vcom_strings[] = {
|
||||
{sizeof vcom_string0, vcom_string0},
|
||||
{sizeof vcom_string1, vcom_string1},
|
||||
{sizeof vcom_string2, vcom_string2},
|
||||
{sizeof vcom_string3, vcom_string3}
|
||||
};
|
||||
|
||||
/*
|
||||
* Handles the GET_DESCRIPTOR callback. All required descriptors must be
|
||||
* handled here.
|
||||
*/
|
||||
static const USBDescriptor *get_descriptor(USBDriver *usbp,
|
||||
uint8_t dtype,
|
||||
uint8_t dindex,
|
||||
uint16_t lang) {
|
||||
|
||||
(void)usbp;
|
||||
(void)lang;
|
||||
switch (dtype) {
|
||||
case USB_DESCRIPTOR_DEVICE:
|
||||
return &vcom_device_descriptor;
|
||||
case USB_DESCRIPTOR_CONFIGURATION:
|
||||
return &vcom_configuration_descriptor;
|
||||
case USB_DESCRIPTOR_STRING:
|
||||
if (dindex < 4)
|
||||
return &vcom_strings[dindex];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief IN EP1 state.
|
||||
*/
|
||||
static USBInEndpointState ep1instate;
|
||||
|
||||
/**
|
||||
* @brief OUT EP1 state.
|
||||
*/
|
||||
static USBOutEndpointState ep1outstate;
|
||||
|
||||
/**
|
||||
* @brief EP1 initialization structure (both IN and OUT).
|
||||
*/
|
||||
static const USBEndpointConfig ep1config = {
|
||||
USB_EP_MODE_TYPE_BULK,
|
||||
NULL,
|
||||
sduDataTransmitted,
|
||||
sduDataReceived,
|
||||
0x0040,
|
||||
0x0040,
|
||||
&ep1instate,
|
||||
&ep1outstate,
|
||||
2,
|
||||
NULL
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief IN EP2 state.
|
||||
*/
|
||||
static USBInEndpointState ep2instate;
|
||||
|
||||
/**
|
||||
* @brief EP2 initialization structure (IN only).
|
||||
*/
|
||||
static const USBEndpointConfig ep2config = {
|
||||
USB_EP_MODE_TYPE_INTR,
|
||||
NULL,
|
||||
sduInterruptTransmitted,
|
||||
NULL,
|
||||
0x0010,
|
||||
0x0000,
|
||||
&ep2instate,
|
||||
NULL,
|
||||
1,
|
||||
NULL
|
||||
};
|
||||
|
||||
/*
|
||||
* Handles the USB driver global events.
|
||||
*/
|
||||
static void usb_event(USBDriver *usbp, usbevent_t event) {
|
||||
extern SerialUSBDriver SDU1;
|
||||
|
||||
switch (event) {
|
||||
case USB_EVENT_ADDRESS:
|
||||
return;
|
||||
case USB_EVENT_CONFIGURED:
|
||||
chSysLockFromISR();
|
||||
|
||||
/* Enables the endpoints specified into the configuration.
|
||||
Note, this callback is invoked from an ISR so I-Class functions
|
||||
must be used.*/
|
||||
usbInitEndpointI(usbp, USBD1_DATA_REQUEST_EP, &ep1config);
|
||||
usbInitEndpointI(usbp, USBD1_INTERRUPT_REQUEST_EP, &ep2config);
|
||||
|
||||
/* Resetting the state of the CDC subsystem.*/
|
||||
sduConfigureHookI(&SDU1);
|
||||
|
||||
chSysUnlockFromISR();
|
||||
return;
|
||||
case USB_EVENT_RESET:
|
||||
/* Falls into.*/
|
||||
case USB_EVENT_UNCONFIGURED:
|
||||
/* Falls into.*/
|
||||
case USB_EVENT_SUSPEND:
|
||||
chSysLockFromISR();
|
||||
|
||||
/* Disconnection event on suspend.*/
|
||||
sduSuspendHookI(&SDU1);
|
||||
|
||||
chSysUnlockFromISR();
|
||||
return;
|
||||
case USB_EVENT_WAKEUP:
|
||||
chSysLockFromISR();
|
||||
|
||||
/* Disconnection event on suspend.*/
|
||||
sduWakeupHookI(&SDU1);
|
||||
|
||||
chSysUnlockFromISR();
|
||||
return;
|
||||
case USB_EVENT_STALLED:
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Handles the USB driver global events.
|
||||
*/
|
||||
static void sof_handler(USBDriver *usbp) {
|
||||
|
||||
(void)usbp;
|
||||
|
||||
osalSysLockFromISR();
|
||||
sduSOFHookI(&SDU1);
|
||||
osalSysUnlockFromISR();
|
||||
}
|
||||
|
||||
/*
|
||||
* USB driver configuration.
|
||||
*/
|
||||
const USBConfig usbcfg = {
|
||||
usb_event,
|
||||
get_descriptor,
|
||||
sduRequestsHook,
|
||||
sof_handler
|
||||
};
|
||||
|
||||
/*
|
||||
* Serial over USB driver configuration.
|
||||
*/
|
||||
const SerialUSBConfig serusbcfg = {
|
||||
&USBD1,
|
||||
USBD1_DATA_REQUEST_EP,
|
||||
USBD1_DATA_AVAILABLE_EP,
|
||||
USBD1_INTERRUPT_REQUEST_EP
|
||||
};
|
|
@ -201,7 +201,7 @@
|
|||
#define STM32_UART_USE_UART4 FALSE
|
||||
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||
#define STM32_UART_UART4_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART3_8_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,8 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Refresh" content="0; URL=html/index.html">
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,5 @@
|
|||
del html\*.* /Q
|
||||
doxygen Doxyfile_chm
|
||||
del html\*.md5
|
||||
del html\*.map
|
||||
pause
|
|
@ -0,0 +1,5 @@
|
|||
del html\*.* /Q
|
||||
doxygen Doxyfile_html
|
||||
del html\*.md5
|
||||
del html\*.map
|
||||
pause
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
rm html/*
|
||||
doxygen Doxyfile_html
|
||||
rm html/*.md5
|
||||
rm html/*.map
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
rsync -avP -e ssh --delete --exclude=.* ./html/ gdisirio,chibios@web.sourceforge.net:/home/groups/c/ch/chibios/htdocs/docs3/ex
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio.
|
||||
|
||||
This file is part of ChibiOS.
|
||||
|
||||
ChibiOS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ChibiOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @mainpage Introduction
|
||||
* @author Giovanni Di Sirio (gdisirio@users.sourceforge.net).
|
||||
* @author Rocco Marco Guglielmi (guglielmir@playembedded.org).
|
||||
*
|
||||
* <h2>Features</h2>
|
||||
* - EXternal devices (EX) supporting numerous devices external to the MCU
|
||||
* abstracting common devices which are part of modern embedded systems.
|
||||
* - EX resides on top of HAL which offers, among others, a set of abstract
|
||||
* interfaces like Generic Sensor, Gyroscope, Magnetometer, Accelerometer,
|
||||
* Barometer, Thermometer: EX offers a phisical implementation of them.
|
||||
* - Currently STMicroelectronics supported devices are:
|
||||
* - @b HTS221: Capacitive digital humidity sensor;
|
||||
* - @b L3GD20: 3-axis digital gyroscope;
|
||||
* - @b LIS3DSH: 3-axis digital motion sensor;
|
||||
* - @b LIS3MDL: Ultra low power, high performances 3-axis magnetometer;
|
||||
* - @b LIS302DL: 3-axis motion sensor;
|
||||
* - @b LPS25H: Piezoresistive 260-1260 hPa pressure sensor;
|
||||
* - @b LSM6DS0: 6-axis iNEMO inertial module;
|
||||
* - @b LSM303DLHC: Ultra compact high performance e-compass;
|
||||
* - Currently Micron Technology supported devices are:
|
||||
* - @b M25Q: Serial NOR Flash;
|
||||
*/
|
4909
doc/hal/Doxyfile_chm
4909
doc/hal/Doxyfile_chm
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -790,7 +790,9 @@ INPUT = ./src \
|
|||
../../os/nil/dox \
|
||||
../../os/nil/src \
|
||||
../../os/nil/include \
|
||||
../../os/nil/templates
|
||||
../../os/nil/templates \
|
||||
../../os/common/oslib/src \
|
||||
../../os/common/oslib/include
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
|
|
|
@ -790,7 +790,9 @@ INPUT = ./src \
|
|||
../../os/nil/dox \
|
||||
../../os/nil/src \
|
||||
../../os/nil/include \
|
||||
../../os/nil/templates
|
||||
../../os/nil/templates \
|
||||
../../os/common/oslib/src \
|
||||
../../os/common/oslib/include
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
|
|
|
@ -38,7 +38,7 @@ PROJECT_NAME = ChibiOS/RT
|
|||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = 4.0.0
|
||||
PROJECT_NUMBER = 3.2.0
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
@ -790,7 +790,9 @@ INPUT = ./src \
|
|||
../../os/rt/dox \
|
||||
../../os/rt/src \
|
||||
../../os/rt/include \
|
||||
../../os/rt/templates
|
||||
../../os/rt/templates \
|
||||
../../os/common/oslib/src \
|
||||
../../os/common/oslib/include
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
|
|
|
@ -38,7 +38,7 @@ PROJECT_NAME = ChibiOS/RT
|
|||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = 4.0.0
|
||||
PROJECT_NUMBER = 3.2.0
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
@ -790,7 +790,9 @@ INPUT = ./src \
|
|||
../../os/rt/dox \
|
||||
../../os/rt/src \
|
||||
../../os/rt/include \
|
||||
../../os/rt/templates
|
||||
../../os/rt/templates \
|
||||
../../os/common/oslib/src \
|
||||
../../os/common/oslib/include
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||
|
|
|
@ -91,7 +91,7 @@ osStatus osKernelInitialize(void) {
|
|||
chPoolObjectInit(&sempool, sizeof(semaphore_t), chCoreAllocAligned);
|
||||
chPoolLoadArray(&sempool, semaphores, CMSIS_CFG_NUM_SEMAPHORES);
|
||||
|
||||
chPoolObjectInit(&timpool, sizeof(virtual_timer_t), chCoreAllocAligned);
|
||||
chPoolObjectInit(&timpool, sizeof(struct os_timer_cb), chCoreAllocAligned);
|
||||
chPoolLoadArray(&timpool, timers, CMSIS_CFG_NUM_TIMERS);
|
||||
|
||||
return osOK;
|
||||
|
|
|
@ -163,6 +163,7 @@ static inline void *chHeapAlloc(memory_heap_t *heapp, size_t size) {
|
|||
* same value aligned to the next @p CH_HEAP_ALIGNMENT multiple.
|
||||
*
|
||||
* @param[in] p pointer to the memory block
|
||||
* @return Size of the block.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
* @file m25q.c
|
||||
* @brief Micron serial flash driver code.
|
||||
*
|
||||
* @addtogroup m25q
|
||||
* @addtogroup M25Q
|
||||
* @ingroup EX_MICRON
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
* @file m25q.h
|
||||
* @brief Micron serial flash driver header.
|
||||
*
|
||||
* @addtogroup m25q
|
||||
* @addtogroup M25Q
|
||||
* @ingroup EX_MICRON
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
* @file hts221.c
|
||||
* @brief HTS221 MEMS interface module code.
|
||||
*
|
||||
* @addtogroup hts221
|
||||
* @addtogroup HTS221
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
@ -100,7 +101,7 @@ msg_t hts221I2CWriteRegister(I2CDriver *i2cp, uint8_t* txbuf, size_t n) {
|
|||
* calibration registers.
|
||||
* @notapi
|
||||
*
|
||||
* @param[in] dev pointer to the HTS221 interface
|
||||
* @param[in] devp pointer to the HTS221 interface
|
||||
* @param[in] flag flag to select parameters
|
||||
* @return the operation status.
|
||||
*/
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
* @file hts221.h
|
||||
* @brief HTS221 MEMS interface module header.
|
||||
*
|
||||
*
|
||||
* @addtogroup HTS221
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
#ifndef _HTS221_H_
|
||||
|
@ -404,5 +407,4 @@ extern "C" {
|
|||
|
||||
#endif /* _HTS221_H_ */
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
|
@ -22,7 +22,8 @@
|
|||
* @file l3gd20.c
|
||||
* @brief L3GD20 MEMS interface module code.
|
||||
*
|
||||
* @addtogroup l3gd20
|
||||
* @addtogroup L3GD20
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
@ -56,12 +57,12 @@
|
|||
* @param[in] b pointer to an output buffer.
|
||||
*/
|
||||
static void l3gd20SPIReadRegister(SPIDriver *spip, uint8_t reg, size_t n,
|
||||
uint8_t* rxbuf) {
|
||||
uint8_t* b) {
|
||||
uint8_t cmd;
|
||||
(n == 1) ? (cmd = reg | L3GD20_RW) : (cmd = reg | L3GD20_RW | L3GD20_MS);
|
||||
spiSelect(spip);
|
||||
spiSend(spip, 1, &cmd);
|
||||
spiReceive(spip, n, rxbuf);
|
||||
spiReceive(spip, n, b);
|
||||
spiUnselect(spip);
|
||||
}
|
||||
|
||||
|
@ -72,7 +73,7 @@ static void l3gd20SPIReadRegister(SPIDriver *spip, uint8_t reg, size_t n,
|
|||
* @param[in] spip pointer to the SPI interface
|
||||
* @param[in] reg starting register address
|
||||
* @param[in] n number of adjacent registers to write
|
||||
* @param[in] value pointer to a buffer of values.
|
||||
* @param[in] b pointer to a buffer of values.
|
||||
*/
|
||||
static void l3gd20SPIWriteRegister(SPIDriver *spip, uint8_t reg, size_t n,
|
||||
uint8_t* b) {
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
* @file l3gd20.h
|
||||
* @brief L3GD20 MEMS interface module header.
|
||||
*
|
||||
* @addtogroup L3GD20
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
#ifndef _L3GD20_H_
|
||||
|
@ -377,7 +379,7 @@ typedef enum {
|
|||
|
||||
/**
|
||||
* @brief L3GD20 LP2 filter mode.
|
||||
* @detail To activate LP2 HP should be active
|
||||
* @details To activate LP2 HP should be active
|
||||
*/
|
||||
typedef enum {
|
||||
L3GD20_LP2M_ON = 0x00, /**< LP2 filter activated. */
|
||||
|
@ -465,7 +467,7 @@ typedef struct {
|
|||
l3gd20_hpcf_t hpconfiguration;
|
||||
/**
|
||||
* @brief L3GD20 LP2 filter mode.
|
||||
* @detail To activate LP2 HP should be active
|
||||
* @details To activate LP2 HP should be active
|
||||
*/
|
||||
l3gd20_lp2m_t lp2mode;
|
||||
#endif
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
* @file lis302dl.c
|
||||
* @brief LIS302DL MEMS interface module code.
|
||||
*
|
||||
* @addtogroup lis302dl
|
||||
* @addtogroup LIS302DL
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
@ -72,7 +73,7 @@ static void lis302dlSPIReadRegister(SPIDriver *spip, uint8_t reg, size_t n,
|
|||
* @param[in] spip pointer to the SPI interface
|
||||
* @param[in] reg starting register address
|
||||
* @param[in] n number of adjacent registers to write
|
||||
* @param[in] value pointer to a buffer of values.
|
||||
* @param[in] b pointer to a buffer of values.
|
||||
*/
|
||||
static void lis302dlSPIWriteRegister(SPIDriver *spip, uint8_t reg, size_t n,
|
||||
uint8_t* b) {
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
* @file lis302dl.h
|
||||
* @brief LIS302DL MEMS interface module header.
|
||||
*
|
||||
* @addtogroup LIS302DL
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
@ -159,6 +161,7 @@
|
|||
#define LIS302DL_CTRL_REG3_PP_OD (1 << 6) /**< Push-pull open-drain */
|
||||
#define LIS302DL_CTRL_REG3_IHL (1 << 7) /**< Int active high low */
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver pre-compile time settings. */
|
||||
/*===========================================================================*/
|
||||
|
@ -333,7 +336,7 @@ typedef struct LIS302DLDriver LIS302DLDriver;
|
|||
|
||||
|
||||
/**
|
||||
* @extends BaseAccelerometerVMT.
|
||||
* @extends BaseAccelerometerVMT
|
||||
*
|
||||
* @brief @p LIS302DL virtual methods table.
|
||||
*/
|
||||
|
@ -358,7 +361,7 @@ struct LIS302DLVMT {
|
|||
float fullscale;
|
||||
|
||||
/**
|
||||
* @extends BaseAccelerometer.
|
||||
* @extends BaseAccelerometer
|
||||
*
|
||||
* @brief LIS302DL 3-axis accelerometer class.
|
||||
* @details This class extends @p BaseAccelerometer by adding physical
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
* @file lis3dsh.c
|
||||
* @brief LIS3DSH MEMS interface module code.
|
||||
*
|
||||
* @addtogroup lis3dsh
|
||||
* @addtogroup LIS3DSH
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
@ -74,7 +75,7 @@ static void lis3dshSPIReadRegister(SPIDriver *spip, uint8_t reg, size_t n,
|
|||
* @param[in] spip pointer to the SPI interface
|
||||
* @param[in] reg starting register address
|
||||
* @param[in] n number of adjacent registers to write
|
||||
* @param[in] value pointer to a buffer of values.
|
||||
* @param[in] b pointer to a buffer of values.
|
||||
*/
|
||||
static void lis3dshSPIWriteRegister(SPIDriver *spip, uint8_t reg, size_t n,
|
||||
uint8_t* b) {
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
* @file lis3dsh.h
|
||||
* @brief LIS3DSH MEMS interface module header.
|
||||
*
|
||||
* @addtogroup LIS3DSH
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
* @file lis3mdl.c
|
||||
* @brief LIS3MDL MEMS interface module code.
|
||||
*
|
||||
* @addtogroup lis3mdl
|
||||
* @addtogroup LIS3MDL
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
* @file lis3mdl.h
|
||||
* @brief LIS3MDL MEMS interface module header.
|
||||
*
|
||||
* @addtogroup LIS3MDL
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
#ifndef _LIS3MDL_H_
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
* @file lps25h.c
|
||||
* @brief LPS25H MEMS interface module code.
|
||||
*
|
||||
* @addtogroup lps25h
|
||||
* @addtogroup LPS25H
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
* @file lps25h.h
|
||||
* @brief LPS25H MEMS interface module header.
|
||||
*
|
||||
* @addtogroup LPS25H
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
#ifndef _LPS25H_H_
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
* @file lsm303dlhc.c
|
||||
* @brief LSM303DLHC MEMS interface module code.
|
||||
*
|
||||
* @addtogroup lsm303dlhc
|
||||
* @addtogroup LSM303DLHC
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
* @file lsm303dlhc.h
|
||||
* @brief LSM303DLHC MEMS interface module header.
|
||||
*
|
||||
* @addtogroup LSM303DLHC
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
#ifndef _LSM303DLHC_H_
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
* @file lsm6ds0.c
|
||||
* @brief LSM6DS0 MEMS interface module code.
|
||||
*
|
||||
* @addtogroup lsm6ds0
|
||||
* @addtogroup LSM6DS0
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
* @file lsm6ds0.h
|
||||
* @brief LSM6DS0 MEMS interface module header.
|
||||
*
|
||||
* @addtogroup LSM6DS0
|
||||
* @ingroup EX_ST
|
||||
* @{
|
||||
*/
|
||||
#ifndef _LSM6DS0_H_
|
||||
|
|
|
@ -14,13 +14,9 @@
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef USBCFG_H
|
||||
#define USBCFG_H
|
||||
|
||||
extern const USBConfig usbcfg;
|
||||
extern SerialUSBConfig serusbcfg;
|
||||
extern SerialUSBDriver SDU1;
|
||||
|
||||
#endif /* USBCFG_H */
|
||||
|
||||
/** @} */
|
||||
/**
|
||||
* @defgroup HAL_ACCELEROMETER Generic Accelerometer Interface
|
||||
* @brief HAL Generic Accelerometer Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_BAROMETER Generic Barometer Interface
|
||||
* @brief HAL Generic Barometer Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_COMPASS Generic Compass Interface
|
||||
* @brief HAL Generic Compass Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_FLASH Generic Flash Driver Interface
|
||||
* @brief HAL Generic Flash Driver Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_GYROSCOPE Generic Gyroscope Interface
|
||||
* @brief HAL Generic Gyroscope Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL HAL
|
||||
* @brief Hardware Abstraction Layer.
|
||||
* @details Under ChibiOS the set of the various device driver interfaces
|
||||
* is called the HAL subsystem: Hardware Abstraction Layer. The HAL is the
|
||||
* abstract interface between ChibiOS applications and hardware.
|
||||
*
|
||||
* @section hal_peripheral interfaces HAL Peripheral Interfaces
|
||||
* These are a particular case of HAL Interfaces since they are an abstraction
|
||||
* of a hardware.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_ABSTRACT_PERIPHERALS Abstract Peripheral Interfaces
|
||||
* @brief HAL Abstract Peripheral Interfaces.
|
||||
*
|
||||
* @ingroup HAL
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_HYGROMETER Generic Hygrometer Interface
|
||||
* @brief HAL Generic Hygrometer Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_JESD216_FLASH JESD216 Compliant Flash Driver Interface
|
||||
* @brief HAL JESD216 Compliant Flash Driver Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup EX EX
|
||||
* @brief EXternal periferals.
|
||||
* @details Under ChibiOS the set of the complex device driver interfaces
|
||||
* dedicated to external peripherals is called the EX subsystem. The EX resides
|
||||
* on top of HAL and is actually a set of libraries for external devices like
|
||||
* MEMS, Displays, Flash memories and so on. These libraries are the
|
||||
* implementation of one or more Abstract Interfaces brought by HAL subsystem.
|
||||
* EX also relies on HAL normal drivers to interface the peripherals.
|
||||
*
|
||||
* @section ex_complex_drivers_architecture EX Complex Drivers Architecture
|
||||
* Each EX driver can be considered as a standalone Complex Device Driver. For
|
||||
* ease of use these drivers are grouped by vendor:
|
||||
* - Micron Technology Peripherals
|
||||
* - STMicroelectronics Peripherals
|
||||
* .
|
||||
* @section micron_devices Micron Technology Devices
|
||||
* This section contains all the drivers of devices produced by
|
||||
* Micron Technology. Devices currently supported are FLASH and are:
|
||||
* - @b M25Q: Serial NOR flash;
|
||||
* .
|
||||
*
|
||||
* @section stmicroelectronics_devices STMicroelectronics Devices
|
||||
* This section contains all the drivers of devices produced by
|
||||
* STMicroelectronics. Devices currently supported are MEMS and are:
|
||||
* - @b HTS221: Capacitive digital humidity sensor;
|
||||
* - @b L3GD20: 3-axis digital gyroscope;
|
||||
* - @b LIS3DSH: 3-axis digital motion sensor;
|
||||
* - @b LIS3MDL: Ultra low power, high performances 3-axis magnetometer;
|
||||
* - @b LIS302DL: 3-axis motion sensor;
|
||||
* - @b LPS25H: Piezoresistive 260-1260 hPa pressure sensor;
|
||||
* - @b LSM6DS0: 6-axis iNEMO inertial module;
|
||||
* - @b LSM303DLHC: Ultra compact high performance e-compass;
|
||||
* .
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup EX_MICRON Micron Technology Devices
|
||||
* @brief Micron Technology Devices.
|
||||
*
|
||||
* @ingroup EX
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup EX_ST STMicroelectronics Devices
|
||||
* @brief STMicroelectronics Devices.
|
||||
*
|
||||
* @ingroup EX
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_SENSORS Generic Sensor Interface
|
||||
* @brief HAL Generic Sensor Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_THERMOMETER Generic Thermometer Interface
|
||||
* @brief HAL Generic Thermometer Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_ACCELEROMETER Generic Accelerometer Interface
|
||||
* @brief HAL Generic Accelerometer Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_BAROMETER Generic Barometer Interface
|
||||
* @brief HAL Generic Barometer Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_COMPASS Generic Compass Interface
|
||||
* @brief HAL Generic Compass Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -15,61 +15,8 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @defgroup NOR_FLASH Abstract NOR Flash Class
|
||||
* @brief Generic NOR Flash interface.
|
||||
* @details This module implements a generic class for NOR Flash devices.
|
||||
* @defgroup HAL_FLASH Generic Flash Driver Interface
|
||||
* @brief HAL Generic Flash Driver Interface.
|
||||
*
|
||||
* @section flash_1 Driver State Machine
|
||||
* The flash driver implements a state machine internally, not all the driver
|
||||
* functionalities can be used in any moment, any transition not explicitly
|
||||
* shown in the following diagram has to be considered an error and shall
|
||||
* be captured by an assertion (if enabled).
|
||||
* @dot
|
||||
digraph example {
|
||||
rankdir="LR";
|
||||
node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.9", height="0.9"];
|
||||
edge [fontname=Helvetica, fontsize=8];
|
||||
stop [label="FLS_STOP\nLow Power"];
|
||||
uninit [label="FLS_UNINIT", style="bold"];
|
||||
ready [label="FLS_READY\nClock Enabled"];
|
||||
read [label="FLS_READ\nReading"];
|
||||
program [label="FLS_PGM\nProgramming"];
|
||||
erasea [label="FLS_ERASEA\nErasing All"];
|
||||
erases [label="FLS_ERASES\nErasing Sector"];
|
||||
uninit -> stop [label=" flashInit()", constraint=false];
|
||||
stop -> stop [label=" flashStop()"];
|
||||
stop -> ready [label=" flashStart()"];
|
||||
ready -> stop [label=" flashStop()"];
|
||||
ready -> read [label=" flashRead()\nflashVerifyErase()"];
|
||||
read -> ready [label=" return"];
|
||||
ready -> program [label=" flashProgram()"];
|
||||
program -> ready [label=" return"];
|
||||
ready -> erasea [label=" flashEraseAll)"];
|
||||
erasea -> ready [label=" flashQueryErase()\nFLASH_NO_ERROR\nFLASH_ERROR_*"];
|
||||
erasea -> erasea [label=" flashQueryErase()\nflashProgram()\nflashRead()\nFLASH_BUSY_ERASE"];
|
||||
ready -> erases [label=" flashEraseSector()"];
|
||||
erases -> ready [label=" flashQueryErase()\nFLASH_NO_ERROR\nFLASH_ERROR_*"];
|
||||
erases -> erases [label=" flashQueryErase()\nflashProgram()\nflashRead()\nFLASH_BUSY_ERASE"];
|
||||
}
|
||||
* @enddot
|
||||
*
|
||||
* @section flash_2 Flash Operations.
|
||||
* This driver abstracts a generic PWM timer composed of:
|
||||
* - A clock prescaler.
|
||||
* - A main up counter.
|
||||
* - A comparator register that resets the main counter to zero when the limit
|
||||
* is reached. An optional callback can be generated when this happens.
|
||||
* - An array of @p PWM_CHANNELS PWM channels, each channel has an output,
|
||||
* a comparator and is able to invoke an optional callback when a comparator
|
||||
* match with the main counter happens.
|
||||
* .
|
||||
* A PWM channel output can be in two different states:
|
||||
* - <b>IDLE</b>, when the channel is disabled or after a match occurred.
|
||||
* - <b>ACTIVE</b>, when the channel is enabled and a match didn't occur yet
|
||||
* in the current PWM cycle.
|
||||
* .
|
||||
* Note that the two states can be associated to both logical zero or one in
|
||||
* the @p PWMChannelConfig structure.
|
||||
*
|
||||
* @ingroup HAL_INTERFACES
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_GYROSCOPE Generic Gyroscope Interface
|
||||
* @brief HAL Generic Gyroscope Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_ABSTRACT_PERIPHERALS Abstract Peripheral Interfaces
|
||||
* @brief HAL Abstract Peripheral Interfaces.
|
||||
*
|
||||
* @ingroup HAL_INTERFACES
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_HYGROMETER Generic Hygrometer Interface
|
||||
* @brief HAL Generic Hygrometer Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_JESD216_FLASH JESD216 Compliant Flash Driver Interface
|
||||
* @brief HAL JESD216 Compliant Flash Driver Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -119,7 +119,7 @@
|
|||
*
|
||||
* @ingroup IO
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup HAL_INNER_CODE Inner Code
|
||||
* @brief HAL Inner Code.
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup NOR_FLASH Abstract NOR Flash Class
|
||||
* @brief Generic NOR Flash interface.
|
||||
* @details This module implements a generic class for NOR Flash devices.
|
||||
*
|
||||
* @section flash_1 Driver State Machine
|
||||
* The flash driver implements a state machine internally, not all the driver
|
||||
* functionalities can be used in any moment, any transition not explicitly
|
||||
* shown in the following diagram has to be considered an error and shall
|
||||
* be captured by an assertion (if enabled).
|
||||
* @dot
|
||||
digraph example {
|
||||
rankdir="LR";
|
||||
node [shape=circle, fontname=Helvetica, fontsize=8, fixedsize="true", width="0.9", height="0.9"];
|
||||
edge [fontname=Helvetica, fontsize=8];
|
||||
stop [label="FLS_STOP\nLow Power"];
|
||||
uninit [label="FLS_UNINIT", style="bold"];
|
||||
ready [label="FLS_READY\nClock Enabled"];
|
||||
read [label="FLS_READ\nReading"];
|
||||
program [label="FLS_PGM\nProgramming"];
|
||||
erasea [label="FLS_ERASEA\nErasing All"];
|
||||
erases [label="FLS_ERASES\nErasing Sector"];
|
||||
uninit -> stop [label=" flashInit()", constraint=false];
|
||||
stop -> stop [label=" flashStop()"];
|
||||
stop -> ready [label=" flashStart()"];
|
||||
ready -> stop [label=" flashStop()"];
|
||||
ready -> read [label=" flashRead()\nflashVerifyErase()"];
|
||||
read -> ready [label=" return"];
|
||||
ready -> program [label=" flashProgram()"];
|
||||
program -> ready [label=" return"];
|
||||
ready -> erasea [label=" flashEraseAll)"];
|
||||
erasea -> ready [label=" flashQueryErase()\nFLASH_NO_ERROR\nFLASH_ERROR_*"];
|
||||
erasea -> erasea [label=" flashQueryErase()\nflashProgram()\nflashRead()\nFLASH_BUSY_ERASE"];
|
||||
ready -> erases [label=" flashEraseSector()"];
|
||||
erases -> ready [label=" flashQueryErase()\nFLASH_NO_ERROR\nFLASH_ERROR_*"];
|
||||
erases -> erases [label=" flashQueryErase()\nflashProgram()\nflashRead()\nFLASH_BUSY_ERASE"];
|
||||
}
|
||||
* @enddot
|
||||
*
|
||||
* @section flash_2 Flash Operations.
|
||||
* This driver abstracts a generic PWM timer composed of:
|
||||
* - A clock prescaler.
|
||||
* - A main up counter.
|
||||
* - A comparator register that resets the main counter to zero when the limit
|
||||
* is reached. An optional callback can be generated when this happens.
|
||||
* - An array of @p PWM_CHANNELS PWM channels, each channel has an output,
|
||||
* a comparator and is able to invoke an optional callback when a comparator
|
||||
* match with the main counter happens.
|
||||
* .
|
||||
* A PWM channel output can be in two different states:
|
||||
* - <b>IDLE</b>, when the channel is disabled or after a match occurred.
|
||||
* - <b>ACTIVE</b>, when the channel is enabled and a match didn't occur yet
|
||||
* in the current PWM cycle.
|
||||
* .
|
||||
* Note that the two states can be associated to both logical zero or one in
|
||||
* the @p PWMChannelConfig structure.
|
||||
*
|
||||
* @ingroup HAL_INTERFACES
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_SENSORS Generic Sensor Interface
|
||||
* @brief HAL Generic Sensor Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup HAL_THERMOMETER Generic Thermometer Interface
|
||||
* @brief HAL Generic Thermometer Interface.
|
||||
*
|
||||
* @ingroup HAL_ABSTRACT_PERIPHERALS
|
||||
*/
|
|
@ -50,7 +50,10 @@
|
|||
* @brief Waits until the current erase operation is finished.
|
||||
*
|
||||
* @param[in] devp pointer to a @p BaseFlash object
|
||||
* @param[in] cb polling callback or @p NULL
|
||||
*
|
||||
* @return An error code.
|
||||
* @retval FLASH_NO_ERROR if there is no erase operation in progress.
|
||||
* @retval FLASH_ERROR_ERASE if the erase operation failed.
|
||||
*/
|
||||
flash_error_t flashWaitErase(BaseFlash *devp) {
|
||||
|
||||
|
@ -71,6 +74,11 @@ flash_error_t flashWaitErase(BaseFlash *devp) {
|
|||
|
||||
/**
|
||||
* @brief Returns the offset of a sector.
|
||||
*
|
||||
* @param[in] devp pointer to a @p BaseFlash object
|
||||
* @param[in] sector flash sector number
|
||||
*
|
||||
* @return the offset of the sector
|
||||
*/
|
||||
flash_offset_t flashGetSectorOffset(BaseFlash *devp,
|
||||
flash_sector_t sector) {
|
||||
|
@ -91,6 +99,11 @@ flash_offset_t flashGetSectorOffset(BaseFlash *devp,
|
|||
|
||||
/**
|
||||
* @brief Returns the size of a sector.
|
||||
*
|
||||
* @param[in] devp pointer to a @p BaseFlash object
|
||||
* @param[in] sector flash sector number
|
||||
*
|
||||
* @return the size of the sector
|
||||
*/
|
||||
uint32_t flashGetSectorSize(BaseFlash *devp,
|
||||
flash_sector_t sector) {
|
||||
|
@ -108,5 +121,4 @@ uint32_t flashGetSectorSize(BaseFlash *devp,
|
|||
|
||||
return size;
|
||||
}
|
||||
|
||||
/** @} */
|
||||
|
|
|
@ -200,7 +200,7 @@ typedef struct {
|
|||
* @brief Sensors get axes number.
|
||||
*
|
||||
* @param[in] ip pointer to a @p BaseFlash or derived class
|
||||
* @return An error code.
|
||||
* @return A flash device descriptor.
|
||||
*
|
||||
* @api
|
||||
*/
|
||||
|
@ -230,7 +230,7 @@ typedef struct {
|
|||
* @param[in] ip pointer to a @p BaseFlash or derived class
|
||||
* @param[in] offset flash offset
|
||||
* @param[in] n number of bytes to be programmed
|
||||
* @param[in] wp pointer to the data buffer
|
||||
* @param[in] pp pointer to the data buffer
|
||||
* @return An error code.
|
||||
* @retval FLASH_NO_ERROR if there is no erase operation in progress.
|
||||
* @retval FLASH_BUSY_ERASING if there is an erase operation in progress.
|
||||
|
|
|
@ -345,9 +345,10 @@ void rtc_lld_set_time(RTCDriver *rtcp, const RTCDateTime *timespec) {
|
|||
|
||||
/* Writing the registers.*/
|
||||
rtc_enter_init();
|
||||
rtcp->rtc->TR = tr;
|
||||
rtcp->rtc->DR = dr;
|
||||
rtcp->rtc->CR |= timespec->dstflag << RTC_CR_BKP_OFFSET;
|
||||
rtcp->rtc->TR = tr;
|
||||
rtcp->rtc->DR = dr;
|
||||
rtcp->rtc->CR = (rtcp->rtc->CR & ~(1U << RTC_CR_BKP_OFFSET)) |
|
||||
(timespec->dstflag << RTC_CR_BKP_OFFSET);
|
||||
rtc_exit_init();
|
||||
|
||||
/* Leaving a reentrant critical zone.*/
|
||||
|
|
|
@ -127,6 +127,11 @@
|
|||
#define UART8 USART8
|
||||
#endif
|
||||
|
||||
/* Workaround for more differences in headers.*/
|
||||
#if !defined(USART_CR1_M0)
|
||||
#define USART_CR1_M0 USART_CR1_M
|
||||
#endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver exported variables. */
|
||||
/*===========================================================================*/
|
||||
|
@ -676,7 +681,7 @@ void uart_lld_init(void) {
|
|||
STM32_UART_USE_UART5 || STM32_UART_USE_USART6 || \
|
||||
STM32_UART_USE_UART7 || STM32_UART_USE_UART8
|
||||
#if defined(STM32_USART3_8_HANDLER)
|
||||
nvicEnableVector(STM32_USART3_8_NUMBER, STM32_UART_USART3_8_PRIORITY);
|
||||
nvicEnableVector(STM32_USART3_8_NUMBER, STM32_UART_USART3_8_IRQ_PRIORITY);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
@ -845,7 +850,7 @@ void uart_lld_start(UARTDriver *uartp) {
|
|||
|
||||
/* Static DMA setup, the transfer size depends on the USART settings,
|
||||
it is 16 bits if M=1 and PCE=0 else it is 8 bits.*/
|
||||
if ((uartp->config->cr1 & (USART_CR1_M | USART_CR1_PCE)) == USART_CR1_M)
|
||||
if ((uartp->config->cr1 & (USART_CR1_M | USART_CR1_PCE)) == USART_CR1_M0)
|
||||
uartp->dmamode |= STM32_DMA_CR_PSIZE_HWORD | STM32_DMA_CR_MSIZE_HWORD;
|
||||
dmaStreamSetPeripheral(uartp->dmarx, &uartp->usart->RDR);
|
||||
dmaStreamSetPeripheral(uartp->dmatx, &uartp->usart->TDR);
|
||||
|
|
|
@ -136,8 +136,8 @@
|
|||
* @brief USART3..8 interrupt priority level setting.
|
||||
* @note Only valid on those devices with a shared IRQ.
|
||||
*/
|
||||
#if !defined(STM32_UART_USART3_8_PRIORITY) || defined(__DOXYGEN__)
|
||||
#define STM32_UART_USART3_8_PRIORITY 12
|
||||
#if !defined(STM32_UART_USART3_8_IRQ_PRIORITY) || defined(__DOXYGEN__)
|
||||
#define STM32_UART_USART3_8_IRQ_PRIORITY 12
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -1332,11 +1332,9 @@
|
|||
|
||||
/* I2C attributes.*/
|
||||
#define STM32_HAS_I2C1 TRUE
|
||||
#define STM32_I2C1_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 3) |\
|
||||
STM32_DMA_STREAM_ID_MSK(1, 7))
|
||||
#define STM32_I2C1_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 3)
|
||||
#define STM32_I2C1_RX_DMA_CHN 0x00000000
|
||||
#define STM32_I2C1_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 2) |\
|
||||
STM32_DMA_STREAM_ID_MSK(1, 6))
|
||||
#define STM32_I2C1_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 2)
|
||||
#define STM32_I2C1_TX_DMA_CHN 0x00000000
|
||||
|
||||
#define STM32_HAS_I2C2 TRUE
|
||||
|
@ -1375,11 +1373,9 @@
|
|||
|
||||
#define STM32_HAS_SPI2 TRUE
|
||||
#define STM32_SPI2_SUPPORTS_I2S FALSE
|
||||
#define STM32_SPI2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\
|
||||
STM32_DMA_STREAM_ID_MSK(1, 6))
|
||||
#define STM32_SPI2_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 4)
|
||||
#define STM32_SPI2_RX_DMA_CHN 0x00000000
|
||||
#define STM32_SPI2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\
|
||||
STM32_DMA_STREAM_ID_MSK(1, 7))
|
||||
#define STM32_SPI2_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 5)
|
||||
#define STM32_SPI2_TX_DMA_CHN 0x00000000
|
||||
|
||||
#define STM32_HAS_SPI3 FALSE
|
||||
|
@ -1447,23 +1443,21 @@
|
|||
#define STM32_USART1_TX_DMA_CHN 0x00000000
|
||||
|
||||
#define STM32_HAS_USART2 TRUE
|
||||
#define STM32_USART2_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 5) |\
|
||||
STM32_DMA_STREAM_ID_MSK(1, 6))
|
||||
#define STM32_USART2_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 5)
|
||||
#define STM32_USART2_RX_DMA_CHN 0x00000000
|
||||
#define STM32_USART2_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(1, 4) |\
|
||||
STM32_DMA_STREAM_ID_MSK(1, 7))
|
||||
#define STM32_USART2_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 4)
|
||||
#define STM32_USART2_TX_DMA_CHN 0x00000000
|
||||
|
||||
#define STM32_HAS_USART3 TRUE
|
||||
#define STM32_USART3_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 6)
|
||||
#define STM32_USART3_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 3)
|
||||
#define STM32_USART3_RX_DMA_CHN 0x00000000
|
||||
#define STM32_USART3_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 7)
|
||||
#define STM32_USART3_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 2)
|
||||
#define STM32_USART3_TX_DMA_CHN 0x00000000
|
||||
|
||||
#define STM32_HAS_UART4 TRUE
|
||||
#define STM32_UART4_RX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 6)
|
||||
#define STM32_UART4_RX_DMA_MSK 0
|
||||
#define STM32_UART4_RX_DMA_CHN 0x00000000
|
||||
#define STM32_UART4_TX_DMA_MSK STM32_DMA_STREAM_ID_MSK(1, 7)
|
||||
#define STM32_UART4_TX_DMA_MSK 0
|
||||
#define STM32_UART4_TX_DMA_CHN 0x00000000
|
||||
|
||||
#define STM32_HAS_UART5 FALSE
|
||||
|
|
|
@ -1342,7 +1342,7 @@
|
|||
#define STM32_HAS_SPI4 TRUE
|
||||
#define STM32_SPI4_SUPPORTS_I2S FALSE
|
||||
#define STM32_SPI4_RX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(2, 0) |\
|
||||
STM32_DMA_STREAM_ID_MSK(2, 3))|\
|
||||
STM32_DMA_STREAM_ID_MSK(2, 3) |\
|
||||
STM32_DMA_STREAM_ID_MSK(2, 4))
|
||||
#define STM32_SPI4_RX_DMA_CHN 0x00045004
|
||||
#define STM32_SPI4_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(2, 1) |\
|
||||
|
@ -1355,7 +1355,7 @@
|
|||
STM32_DMA_STREAM_ID_MSK(2, 5))
|
||||
#define STM32_SPI5_RX_DMA_CHN 0x00702000
|
||||
#define STM32_SPI5_TX_DMA_MSK (STM32_DMA_STREAM_ID_MSK(2, 4) |\
|
||||
STM32_DMA_STREAM_ID_MSK(2, 5))|\
|
||||
STM32_DMA_STREAM_ID_MSK(2, 5) |\
|
||||
STM32_DMA_STREAM_ID_MSK(2, 6))
|
||||
#define STM32_SPI5_TX_DMA_CHN 0x07520000
|
||||
|
||||
|
|
|
@ -33,11 +33,6 @@
|
|||
* @ingroup kernel
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup types Kernel Types
|
||||
* @ingroup kernel
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup base Base Kernel Services
|
||||
* @details Base kernel services, the base subsystems are always included in
|
||||
|
@ -111,6 +106,12 @@
|
|||
* @ingroup synchronization
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup mem Memory Alignment
|
||||
* @details Memory Alignment services.
|
||||
* @ingroup kernel
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup memory Memory Management
|
||||
* @details Memory Management services.
|
||||
|
@ -137,17 +138,6 @@
|
|||
* @ingroup memory
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup streams Streams and Files
|
||||
* @details Stream and Files interfaces.
|
||||
* @ingroup kernel
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup data_streams Abstract Sequential Streams
|
||||
* @ingroup streams
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup registry Registry
|
||||
* @ingroup kernel
|
||||
|
@ -158,6 +148,11 @@
|
|||
* @ingroup kernel
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup trace Trace
|
||||
* @ingroup kernel
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup time_measurement Time Measurement
|
||||
* @ingroup kernel
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
/*lint -restore*/
|
||||
|
||||
/**
|
||||
* @brief Aligns to the new aligned memory address.
|
||||
* @brief Aligns to the next aligned memory address.
|
||||
*
|
||||
* @param[in] p variable to be aligned
|
||||
* @param[in] a alignment, must be a power of two
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
#if (CH_LICENSE_FEATURES != CH_FEATURES_FULL) && \
|
||||
(CH_LICENSE_FEATURES != CH_FEATURES_INTERMEDIATE) && \
|
||||
(CH_LICENSE_FEATURES == CH_FEATURES_BASIC)
|
||||
(CH_LICENSE_FEATURES != CH_FEATURES_BASIC)
|
||||
#error "invalid CH_LICENSE_FEATURES setting"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio.
|
||||
|
||||
This file is part of ChibiOS.
|
||||
|
||||
ChibiOS is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ChibiOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file chcustomer.h
|
||||
* @brief Customer-related info.
|
||||
*
|
||||
* @addtogroup customer
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef CHCUSTOMER_H
|
||||
#define CHCUSTOMER_H
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Module constants. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Customer readable identifier.
|
||||
*/
|
||||
#define CH_CUSTOMER_ID_STRING "Santa, North Pole"
|
||||
|
||||
/**
|
||||
* @brief Customer code.
|
||||
*/
|
||||
#define CH_CUSTOMER_ID_CODE "xxxx-yyyy"
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Module pre-compile time settings. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Derived constants and error checks. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Module data structures and types. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Module macros. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* External declarations. */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Module inline functions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
#endif /* CHCUSTOMER_H */
|
||||
|
||||
/** @} */
|
17
readme.txt
17
readme.txt
|
@ -43,6 +43,7 @@
|
|||
| | +--ports/ - RTOS ports usable by both RT and NIL.
|
||||
| | +--startup/ - Startup support for all compilers and platforms.
|
||||
| +--ex/ - EX component.
|
||||
| | +--dox/ - EX documentation resources.
|
||||
| | +--Micron/ - EX complex drivers for Micron devices.
|
||||
| | +--ST/ - EX complex drivers for STMicroelectronics devices.
|
||||
| | +--subsystems/ - EX subsystems.
|
||||
|
@ -87,5 +88,21 @@
|
|||
*** Releases and Change Log ***
|
||||
*****************************************************************************
|
||||
|
||||
*** 17.6.1 ***
|
||||
- VAR: Fixed STM32L053 Discovery demo which is unaligned to standard demos (bug
|
||||
#857).
|
||||
- HAL: Fixed unaligned STM32F0xx mcuconf.h files (bug #855).
|
||||
- HAL: Fixed invalid handling of DST flag in STM32 RTCv2 (bug #854).
|
||||
- HAL: Fixed extra right parenthesis in STM32F4 registry (bug #853).
|
||||
- EX: Fixed documentation-related issues (bug #852).
|
||||
- HAL: Fixed documentation-related issues (bug #852).
|
||||
- HAL: Fixed wrong frame size code in STM32 USARTv2 UART driver (bug #851).
|
||||
- NIL: Fixed documentation-related issues (bug #850).
|
||||
- RT: Fixed documentation-related issues (bug #850).
|
||||
- RT: Fixed leftover chcustomer.h file (bug #849).
|
||||
- RT: Fixed invalid check in chchecks.h (bug #848).
|
||||
- HAL: Fixed STM32F070xB: USART invalid DMA channels (bug #847).
|
||||
- VAR: Fixed CMSIS_OS issue in timers (bug #846).
|
||||
|
||||
*** 17.6.0 ***
|
||||
- First 17.6.0 release, see release note 17.6.0.
|
||||
|
|
|
@ -159,8 +159,11 @@
|
|||
*/
|
||||
#define STM32_SERIAL_USE_USART1 FALSE
|
||||
#define STM32_SERIAL_USE_USART2 FALSE
|
||||
#define STM32_SERIAL_USE_USART3 FALSE
|
||||
#define STM32_SERIAL_USE_UART4 FALSE
|
||||
#define STM32_SERIAL_USART1_PRIORITY 3
|
||||
#define STM32_SERIAL_USART2_PRIORITY 3
|
||||
#define STM32_SERIAL_USART3_8_PRIORITY 3
|
||||
|
||||
/*
|
||||
* SPI driver system settings.
|
||||
|
@ -188,14 +191,23 @@
|
|||
*/
|
||||
#define STM32_UART_USE_USART1 FALSE
|
||||
#define STM32_UART_USE_USART2 FALSE
|
||||
#define STM32_UART_USE_USART3 FALSE
|
||||
#define STM32_UART_USE_UART4 FALSE
|
||||
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART3_8_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART3_DMA_PRIORITY 0
|
||||
#define STM32_UART_UART4_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
||||
#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||
#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||
#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||
#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
||||
#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
||||
#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
||||
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
|
|
|
@ -172,8 +172,11 @@
|
|||
*/
|
||||
#define STM32_SERIAL_USE_USART1 FALSE
|
||||
#define STM32_SERIAL_USE_USART2 FALSE
|
||||
#define STM32_SERIAL_USE_USART3 FALSE
|
||||
#define STM32_SERIAL_USE_UART4 FALSE
|
||||
#define STM32_SERIAL_USART1_PRIORITY 3
|
||||
#define STM32_SERIAL_USART2_PRIORITY 3
|
||||
#define STM32_SERIAL_USART3_8_PRIORITY 3
|
||||
|
||||
/*
|
||||
* SPI driver system settings.
|
||||
|
@ -201,14 +204,23 @@
|
|||
*/
|
||||
#define STM32_UART_USE_USART1 FALSE
|
||||
#define STM32_UART_USE_USART2 FALSE
|
||||
#define STM32_UART_USE_USART3 FALSE
|
||||
#define STM32_UART_USE_UART4 FALSE
|
||||
#define STM32_UART_USART1_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART2_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART3_8_IRQ_PRIORITY 3
|
||||
#define STM32_UART_USART1_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART2_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART3_DMA_PRIORITY 0
|
||||
#define STM32_UART_UART4_DMA_PRIORITY 0
|
||||
#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||
#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
||||
#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
|
||||
#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
|
||||
#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3)
|
||||
#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2)
|
||||
#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
|
||||
#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
|
||||
#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue