#include <string.h>
#include <stdio.h>
#include "conf_usb.h"
#include "compiler.h"
#include "board.h"
#include "usb_drv.h"
#include "gpio.h"
#include "usb_descriptors.h"
#include "usb_standard_request.h"
#include "device_ctrl_panel_task.h"
#include "adc.h"
#include "cpled.h"
#include "s_accelerometer.h"
#include "s_joystick.h"
#include "s_light.h"
#include "s_pushb.h"
#include "s_temperature.h"
#include "FreeRTOS.h"
#include "task.h"
Macros | |
#define | RXBUF_SIZE 64 |
#define | STARTUP_LED_DELAY 100 |
#define | STR_SET_LEDM1 "set_actuator_value actuator=ledm1 state=" |
#define | STR_SET_LEDM2 "set_actuator_value actuator=ledm2 state=" |
#define | STR_SET_LEDM3 "set_actuator_value actuator=ledm3 state=" |
#define | STR_SET_LEDM4 "set_actuator_value actuator=ledm4 state=" |
#define | TXBUF_SIZE 40 |
Functions | |
static U32 | build_answer (char *output, const char *log) |
void | device_full_custom_task (void *pvParameters) |
Entry point of the device full custom task management. More... | |
void | device_full_custom_task_init (void) |
This function initializes the hardware/software resources required for the USB Full custom task. More... | |
void | usb_sof_action (void) |
usb_sof_action More... | |
Variables | |
bool | b_report_pending =false |
char | rxbuf [RXBUF_SIZE] |
static U16 | sof_cnt |
char | txbuf [TXBUF_SIZE] |
#define RXBUF_SIZE 64 |
Referenced by device_full_custom_task().
#define STARTUP_LED_DELAY 100 |
Referenced by device_full_custom_task().
#define STR_SET_LEDM1 "set_actuator_value actuator=ledm1 state=" |
Referenced by device_full_custom_task().
#define STR_SET_LEDM2 "set_actuator_value actuator=ledm2 state=" |
Referenced by device_full_custom_task().
#define STR_SET_LEDM3 "set_actuator_value actuator=ledm3 state=" |
Referenced by device_full_custom_task().
#define STR_SET_LEDM4 "set_actuator_value actuator=ledm4 state=" |
Referenced by device_full_custom_task().
#define TXBUF_SIZE 40 |
Referenced by device_full_custom_task().
|
static |
Referenced by device_full_custom_task().
void device_full_custom_task | ( | void * | pvParameters | ) |
Entry point of the device full custom task management.
References accelerometer_measure(), b_joystick_get_value(), b_ledm1_get_value(), b_ledm2_get_value(), b_ledm3_get_value(), b_ledm4_get_value(), b_light_get_value(), b_pushb1_get_value(), b_pushb2_get_value(), b_report_pending, b_temperature_get_value(), build_answer(), configTSK_USB_DFC_PERIOD, data_to_transfer, e_ledm1_set_value(), e_ledm2_set_value(), e_ledm3_set_value(), e_ledm4_set_value(), e_ledm_refresh_intensity(), EP_FC_IN, EP_FC_OUT, Is_device_enumerated, Is_usb_in_ready, Is_usb_out_received, LED_MONO0_GREEN, LED_MONO1_GREEN, LED_MONO2_GREEN, LED_MONO3_GREEN, LED_Off(), LED_On(), rxbuf, RXBUF_SIZE, STARTUP_LED_DELAY, STR_SET_LEDM1, STR_SET_LEDM2, STR_SET_LEDM3, STR_SET_LEDM4, txbuf, TXBUF_SIZE, Usb_ack_in_ready_send, Usb_ack_out_received_free, usb_read_ep_rxpacket(), Usb_reset_endpoint_fifo_access, usb_write_ep_txpacket(), vTaskDelayUntil(), and xTaskGetTickCount().
Referenced by device_full_custom_task_init().
void device_full_custom_task_init | ( | void | ) |
This function initializes the hardware/software resources required for the USB Full custom task.
References accelerometer_init(), configTSK_USB_DFC_NAME, configTSK_USB_DFC_PRIORITY, configTSK_USB_DFC_STACK_SIZE, device_full_custom_task(), Is_usb_device, LED_MONO0_GREEN, LED_MONO1_GREEN, LED_MONO2_GREEN, LED_MONO3_GREEN, LED_Off(), sof_cnt, Usb_enable_sof_interrupt, and xTaskCreate.
Referenced by main().
Referenced by device_full_custom_task().
char rxbuf[RXBUF_SIZE] |
Referenced by device_full_custom_task(), and usb_read_ep_rxpacket().
|
static |
Referenced by device_full_custom_task_init(), and usb_sof_action().
char txbuf[TXBUF_SIZE] |
Referenced by device_full_custom_task(), and usb_write_ep_txpacket().