Update to current master library

can fixes are compile tested only.  I don't have those boards.
f3 i2c is tested on i2c and gives the same results
l1 low power demo seems to have been broken for some time already.
 => should be fixed, but not something I'm going to work on right now.
This commit is contained in:
Karl Palsson
2017-09-01 23:19:46 +00:00
parent d6876b1f77
commit f368819e81
7 changed files with 43 additions and 44 deletions

View File

@@ -18,12 +18,13 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <stddef.h>
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/cm3/systick.h>
#include <libopencm3/stm32/can.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/rcc.h>
struct can_tx_msg {
uint32_t std_id;
@@ -195,11 +196,11 @@ void sys_tick_handler(void)
void usb_lp_can_rx0_isr(void)
{
uint32_t id, fmi;
uint32_t id;
bool ext, rtr;
uint8_t length, data[8];
uint8_t fmi, length, data[8];
can_receive(CAN1, 0, false, &id, &ext, &rtr, &fmi, &length, data);
can_receive(CAN1, 0, false, &id, &ext, &rtr, &fmi, &length, data, NULL);
if (data[0] & 1)
gpio_clear(GPIOA, GPIO8);

View File

@@ -18,12 +18,13 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <stddef.h>
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/cm3/systick.h>
#include <libopencm3/stm32/can.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/rcc.h>
struct can_tx_msg {
uint32_t std_id;
@@ -195,11 +196,11 @@ void sys_tick_handler(void)
void usb_lp_can_rx0_isr(void)
{
uint32_t id, fmi;
uint32_t id;
bool ext, rtr;
uint8_t length, data[8];
uint8_t fmi, length, data[8];
can_receive(CAN1, 0, false, &id, &ext, &rtr, &fmi, &length, data);
can_receive(CAN1, 0, false, &id, &ext, &rtr, &fmi, &length, data, NULL);
if (data[0] & 1)
gpio_clear(GPIOA, GPIO8);

View File

@@ -17,6 +17,7 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <stddef.h>
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/cm3/systick.h>
#include <libopencm3/stm32/can.h>
@@ -173,11 +174,11 @@ void sys_tick_handler(void)
void usb_lp_can_rx0_isr(void)
{
uint32_t id, fmi;
uint32_t id;
bool ext, rtr;
uint8_t length, data[8];
uint8_t fmi, length, data[8];
can_receive(CAN1, 0, false, &id, &ext, &rtr, &fmi, &length, data);
can_receive(CAN1, 0, false, &id, &ext, &rtr, &fmi, &length, data, NULL);
if (data[0] & 0x40)
gpio_clear(GPIOB, GPIO4);

View File

@@ -18,12 +18,13 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/gpio.h>
#include <stddef.h>
#include <libopencm3/cm3/nvic.h>
#include <libopencm3/cm3/systick.h>
#include <libopencm3/stm32/can.h>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/flash.h>
#include <libopencm3/stm32/rcc.h>
struct can_tx_msg {
uint32_t std_id;
@@ -177,11 +178,11 @@ void sys_tick_handler(void)
void usb_lp_can_rx0_isr(void)
{
uint32_t id, fmi;
uint32_t id;
bool ext, rtr;
uint8_t length, data[8];
uint8_t fmi, length, data[8];
can_receive(CAN1, 0, false, &id, &ext, &rtr, &fmi, &length, data);
can_receive(CAN1, 0, false, &id, &ext, &rtr, &fmi, &length, data, NULL);
if (data[0] & 1)
gpio_clear(GPIOA, GPIO6);