Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| dd566be7b5 | |||
| aec34a874f | |||
| 707ec44894 | |||
| 77e34ea969 | |||
| f4dbf99294 | |||
| 7db559a6e7 |
Binary file not shown.
+3
@@ -0,0 +1,3 @@
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
+11
-4
@@ -773,11 +773,13 @@ static void headstage_update_vis_instruction(uint8_t vis_oper) {
|
||||
case VIS_RST:
|
||||
headstage_reset();
|
||||
headstage_state = UMC_STATE_HANDSHAKE;
|
||||
INSTRUCTION.channel_pointer=0;
|
||||
// try to pull PIN_RESET PIN to ground
|
||||
break;
|
||||
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;
|
||||
INSTRUCTION.channel_pointer=0;
|
||||
rearrange_channel_mux_table();
|
||||
UMC_STATE.config_type = CONFIG_AMP_MUX;
|
||||
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);
|
||||
} else {
|
||||
headstage_state = UMC_STATE_HANDSHAKE;
|
||||
INSTRUCTION.channel_pointer=0;
|
||||
rearrange_channel_mux_table();
|
||||
headstage_pwm_start(headstage_system_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:
|
||||
headstage_reset();
|
||||
headstage_state = UMC_STATE_HANDSHAKE;
|
||||
INSTRUCTION.channel_pointer=0;
|
||||
break;
|
||||
|
||||
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_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];
|
||||
} 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]];
|
||||
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);
|
||||
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) {
|
||||
return CONFIG_AMP_MUX;
|
||||
} else {
|
||||
INSTRUCTION.channel_pointer = 0;
|
||||
return CONFIG_AMP_GAIN;
|
||||
}
|
||||
}
|
||||
|
||||
+8
-3
@@ -114,11 +114,11 @@
|
||||
#ifndef FEATURE_OAD
|
||||
// Minimum connection interval (units of 1.25ms, 80=100ms) if automatic
|
||||
// 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
|
||||
// parameter update request is enabled
|
||||
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 6
|
||||
#define DEFAULT_DESIRED_MAX_CONN_INTERVAL 80
|
||||
#else //! FEATURE_OAD
|
||||
// Minimum connection interval (units of 1.25ms, 8=10ms) if automatic
|
||||
// parameter update request is enabled
|
||||
@@ -152,7 +152,7 @@
|
||||
#define SBP_TASK_PRIORITY 1
|
||||
|
||||
#ifndef SBP_TASK_STACK_SIZE
|
||||
#define SBP_TASK_STACK_SIZE 844
|
||||
#define SBP_TASK_STACK_SIZE 1024
|
||||
#endif
|
||||
|
||||
// Internal Events for RTOS application
|
||||
@@ -408,6 +408,9 @@ static void SimpleBLEPeripheral_init(void) {
|
||||
GATT_RegisterForMsgs(self);
|
||||
|
||||
headstage_led_spi_color(COLOR_GREEN);
|
||||
// HCI_LE_ReadMaxDataLenCmd(); //YiChin said this command is not necessary
|
||||
HCI_LE_WriteSuggestedDefaultDataLenCmd(251, 2120); // this is used for data length extension
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -843,6 +846,7 @@ static void SimpleBLEPeripheral_processStateChangeEvt(gaprole_States_t newState)
|
||||
case GAPROLE_WAITING:
|
||||
// Device is started but not advertising, is in waiting period before advertising again
|
||||
SimpleBLEPeripheral_freeAttRsp(bleNotConnected);
|
||||
headstage_led_spi_color(COLOR_GREEN);
|
||||
break;
|
||||
|
||||
case GAPROLE_WAITING_AFTER_TIMEOUT:
|
||||
@@ -858,6 +862,7 @@ static void SimpleBLEPeripheral_processStateChangeEvt(gaprole_States_t newState)
|
||||
break;
|
||||
case GAPROLE_INIT: // Waiting to be started
|
||||
case GAPROLE_ADVERTISING: // Currently Advertising
|
||||
headstage_led_spi_color(COLOR_GREEN);
|
||||
case GAPROLE_CONNECTED_ADV: // In a connection and advertising
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user