Ignore:
Timestamp:
Feb 7, 2025, 1:40:58 PM (3 months ago)
Author:
Zed
Message:

Modbus Master and Slave Hardware were tested.

Location:
ctrl/firmware/Main/SES/Core
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • ctrl/firmware/Main/SES/Core/Src/keys_task.cpp

    r82 r83  
    11#include <cstdio>
    22
    3 #include "FreeRTOS.h"
    4 #include "task.h"
    5 
    6 #include "main.h"
     3#include "beeper_task.h"
    74#include "keys_task.h"
    85#include "utils.h"
     6#include "task.h"
     7#include "main.h"
    98
    109static const char* const TAG = "KEYS";
    11 static uint16_t delay_ms = 500U;
     10static uint16_t delay_ms = 5000U;
    1211
    1312//------------------------------------------------------------------------------
     
    3635                vTaskDelay(delay_ms);
    3736
     37                beeper_msg_t bm { 3U, 900U, 1U};
     38                BaseType_t res = xQueueSendToBack(beeperQueue, &bm, pdMS_TO_TICKS(10));
     39                if (res != pdPASS) printf("%s: Cannot place data into queue!\n", TAG);
     40
    3841                //HAL_GPIO_WritePin(RX1_LED_GPIO_Port, RX1_LED_Pin, GPIO_PIN_SET);
    3942                //HAL_GPIO_WritePin(RX2_LED_GPIO_Port, RX2_LED_Pin, GPIO_PIN_SET);
  • ctrl/firmware/Main/SES/Core/Src/sysdata.c

    r82 r83  
    11#include "sysdata.h"
     2#include "modbus.h"
    23
    34sys_data_t sys_data;
     
    78void sys_data_init(void)
    89{
    9         //
     10        sys_data.s.lb_slave_address = 50U;
     11
     12        sys_data.s.lb_baudrate_mode = 19200U;
     13        sys_data.s.lb_parity_mode = MODBUS_UART_PARITY_EVEN;
     14        sys_data.s.lb_stopbit_mode = 1;
    1015}
Note: See TracChangeset for help on using the changeset viewer.