Changeset - 28d92b4af160
[Not reviewed]
Merge default
0 4 0
matthewreed - 7 years ago 2017-10-05 14:34:01

Merge
4 files changed with 9 insertions and 1 deletions:
0 comments (0 inline, 0 general)
inc/flash.h
Show inline comments
 
@@ -8,12 +8,14 @@
 
#define PAGE_SIZE ((uint16_t)0x400)
 
#define END_ADDR 0x08007FFF
 
 
 
typedef union
 
{
 
    struct {
 
        uint32_t can_id;
 
        uint16_t data_rate;
 
        uint8_t led_brightness;
 
        flash_user_vars_t user;
 
    } val;
 
 
    uint16_t data[128];
inc/protocol.h
Show inline comments
 
@@ -62,6 +62,7 @@ typedef enum {
 
 
void protocol_init(protocol_device_t device);
 
flash_settings_t* protocol_get_settings(void);
 
void protocol_save_settings(void);
 
bool protocol_receive_message(CanRxMsgTypeDef* can_message);
 
bool protocol_send_message(protocol_message_t* message);
 
bool protocol_process_message(protocol_message_t* message);
src/can_buffer.c
Show inline comments
 
@@ -20,7 +20,7 @@ CanBufferStatus can_buffer_add(volatile 
 

	
 
volatile CanRxMsgTypeDef* can_buffer_remove(volatile CanBuffer *buffer)
 
{
 
    volatile CanRxMsgTypeDef* msg;
 
    volatile CanRxMsgTypeDef* msg = NULL;
 
    if (buffer->count > 0) {
 
        msg = &buffer->data[buffer->tail];
 
        buffer->tail = (buffer->tail + 1) % CAN_BUFFER_SIZE;
src/protocol.c
Show inline comments
 
@@ -17,6 +17,11 @@ flash_settings_t* protocol_get_settings(
 
    return &protocol_settings;
 
}
 
 
void protocol_save_settings(void)
 
{
 
    flash_save(&protocol_settings);
 
}
 
 
bool protocol_send_test()
 
{
 
    bool result = true;
0 comments (0 inline, 0 general)