Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f30e22a63 | |||
| f4dbf99294 | |||
| 7db559a6e7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
#safe table
|
||||||
|
#Thu Feb 20 11:57:56 CST 2020
|
||||||
|
framework.info=0
|
||||||
|
.crc1d527c35.v1
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
#safe table
|
||||||
|
#Thu Feb 20 11:57:56 CST 2020
|
||||||
|
framework.info=1
|
||||||
|
.crc1c901602.v1
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
int main(void) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
int main(void) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Binary file not shown.
BIN
Binary file not shown.
+11
-4
@@ -773,11 +773,13 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
|
|||||||
case VIS_RST:
|
case VIS_RST:
|
||||||
headstage_reset();
|
headstage_reset();
|
||||||
headstage_state = UMC_STATE_HANDSHAKE;
|
headstage_state = UMC_STATE_HANDSHAKE;
|
||||||
|
INSTRUCTION.channel_pointer=0;
|
||||||
// try to pull PIN_RESET PIN to ground
|
// try to pull PIN_RESET PIN to ground
|
||||||
break;
|
break;
|
||||||
case VIS_STI:
|
case VIS_STI:
|
||||||
if (headstage_state == UMC_STATE_INTERRUPT) {
|
if (headstage_state == UMC_STATE_INTERRUPT) { //This if cond. seems only for old version digital core
|
||||||
headstage_state = UMC_STATE_INITIAL;
|
headstage_state = UMC_STATE_INITIAL;
|
||||||
|
INSTRUCTION.channel_pointer=0;
|
||||||
rearrange_channel_mux_table();
|
rearrange_channel_mux_table();
|
||||||
UMC_STATE.config_type = CONFIG_AMP_MUX;
|
UMC_STATE.config_type = CONFIG_AMP_MUX;
|
||||||
headstage_led_spi_color(COLOR_BLACK);
|
headstage_led_spi_color(COLOR_BLACK);
|
||||||
@@ -785,6 +787,7 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
|
|||||||
headstage_spi_ask_transaction(4);
|
headstage_spi_ask_transaction(4);
|
||||||
} else {
|
} else {
|
||||||
headstage_state = UMC_STATE_HANDSHAKE;
|
headstage_state = UMC_STATE_HANDSHAKE;
|
||||||
|
INSTRUCTION.channel_pointer=0;
|
||||||
rearrange_channel_mux_table();
|
rearrange_channel_mux_table();
|
||||||
headstage_pwm_start(headstage_system_pwm_handle);
|
headstage_pwm_start(headstage_system_pwm_handle);
|
||||||
headstage_pwm_start(headstage_poly_r_pwm_handle);
|
headstage_pwm_start(headstage_poly_r_pwm_handle);
|
||||||
@@ -800,6 +803,7 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
|
|||||||
case VIS_INT:
|
case VIS_INT:
|
||||||
headstage_reset();
|
headstage_reset();
|
||||||
headstage_state = UMC_STATE_HANDSHAKE;
|
headstage_state = UMC_STATE_HANDSHAKE;
|
||||||
|
INSTRUCTION.channel_pointer=0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VIS_BLE_T:
|
case VIS_BLE_T:
|
||||||
@@ -890,13 +894,15 @@ static void headstage_uni_umc_data_append_notify_buffer(uint8_t* dat_buf) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint8_t channel;
|
uint8_t channel;
|
||||||
|
uint8_t channel_pointer = INSTRUCTION.channel_pointer;
|
||||||
|
|
||||||
if ((INSTRUCTION.enable_channel_number == 1) || (dat_buf[0] == 0xc1)) {
|
if ((INSTRUCTION.enable_channel_number == 1)) {
|
||||||
channel = reverse_channel[INSTRUCTION.last_enable_channel];
|
channel = reverse_channel[INSTRUCTION.last_enable_channel];
|
||||||
} else {
|
} else {
|
||||||
uint8_t channel_pointer = (INSTRUCTION.channel_pointer + 1) % INSTRUCTION.last_enable_channel;
|
//uint8_t channel_pointer = (INSTRUCTION.channel_pointer + 1) % INSTRUCTION.last_enable_channel;
|
||||||
channel = reverse_channel[INSTRUCTION.channel_mux[channel_pointer]];
|
channel = reverse_channel[INSTRUCTION.channel_mux[channel_pointer]];
|
||||||
INSTRUCTION.channel_pointer = channel_pointer;
|
channel_pointer++;
|
||||||
|
INSTRUCTION.channel_pointer = channel_pointer % (INSTRUCTION.last_enable_channel+1);
|
||||||
}
|
}
|
||||||
uint8_t data_size = headstage_notify_append_data(channel, dat_buf);
|
uint8_t data_size = headstage_notify_append_data(channel, dat_buf);
|
||||||
if (data_size >= BLE_NOT_BUFF_SIZE) {
|
if (data_size >= BLE_NOT_BUFF_SIZE) {
|
||||||
@@ -920,6 +926,7 @@ static uint8_t build_umn_ins_config(uint8_t config_type, uint32_t* value) {
|
|||||||
if (channel_pointer < INSTRUCTION.enable_channel_number) {
|
if (channel_pointer < INSTRUCTION.enable_channel_number) {
|
||||||
return CONFIG_AMP_MUX;
|
return CONFIG_AMP_MUX;
|
||||||
} else {
|
} else {
|
||||||
|
INSTRUCTION.channel_pointer = 0;
|
||||||
return CONFIG_AMP_GAIN;
|
return CONFIG_AMP_GAIN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-3
@@ -114,11 +114,11 @@
|
|||||||
#ifndef FEATURE_OAD
|
#ifndef FEATURE_OAD
|
||||||
// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic
|
// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic
|
||||||
// parameter update request is enabled
|
// parameter update request is enabled
|
||||||
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 6
|
#define DEFAULT_DESIRED_MIN_CONN_INTERVAL 80
|
||||||
|
|
||||||
// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic
|
// Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic
|
||||||
// parameter update request is enabled
|
// parameter update request is enabled
|
||||||
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 6
|
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 80
|
||||||
#else //! FEATURE_OAD
|
#else //! FEATURE_OAD
|
||||||
// Minimum connection interval (units of 1.25ms, 8=10ms) if automatic
|
// Minimum connection interval (units of 1.25ms, 8=10ms) if automatic
|
||||||
// parameter update request is enabled
|
// parameter update request is enabled
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
#define SBP_TASK_PRIORITY 1
|
#define SBP_TASK_PRIORITY 1
|
||||||
|
|
||||||
#ifndef SBP_TASK_STACK_SIZE
|
#ifndef SBP_TASK_STACK_SIZE
|
||||||
#define SBP_TASK_STACK_SIZE 844
|
#define SBP_TASK_STACK_SIZE 1024
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Internal Events for RTOS application
|
// Internal Events for RTOS application
|
||||||
@@ -408,6 +408,10 @@ static void SimpleBLEPeripheral_init(void) {
|
|||||||
GATT_RegisterForMsgs(self);
|
GATT_RegisterForMsgs(self);
|
||||||
|
|
||||||
headstage_led_spi_color(COLOR_GREEN);
|
headstage_led_spi_color(COLOR_GREEN);
|
||||||
|
HCI_LE_ReadMaxDataLenCmd();
|
||||||
|
|
||||||
|
HCI_LE_WriteSuggestedDefaultDataLenCmd(251, 2120); // this is used for data length extension
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user