Control Module ABS 2.1 Technical Guide¶
This guide is targeted to the firmware developer. The prerequisite is the knowledge of the functions described in the Technical Guide ABS ver2.0.
The changes between the version 2.1 and version 2.0 are the following:
EEPROMMan library¶
Has not changed.
EthernetMan library¶
Has not changed.
NOTE: The mac address and IP address are the exclusive and specific for each TM4C1293.
GPIOMan library¶
*GPIOMan_AC2: This header file has new definition according to the PCBA ver.2.1: monitoring and control pins has changed and three new buttons were added.
*void configPins(void): Three new pin inputs were added: Lo/Re, SW_UP and SW_DW.
All the other functions were modified according to the new port and pin number PCBA ver. 2.1.
MensajesMan library¶
*MensajesMan_AC2: A new header file were added: "LocalRemoteMan_2.h".
*void ShowModuleInformationLCD(void).- The first version of this function contains the maximum delay which cause an error on the SIR. In order to avoid the a fixed delay, a timestamp was taken and compared with a current counter from the systick and each 500ms update the LCD to show the keepalive.
MultiMan Library¶
Has not changed.
Nokia_5110 Library¶
Has not changed.
ProcesaMan Library¶
- void Process_Petition(char *rx_buffer, char *tx_buffer, uint32_t packet_size): This function has a new segment of code into the "MNTR" command. A character with the read state of the pins was added for the response.
NOTE: The character added was inserted into the response with the following code segment:
uint8_t beam_written = ((digitalRead(MON_UP2))<<5)|((digitalRead(MON_UP1))<<4)|((digitalRead(MON_UP0))<<3)| ((digitalRead(MON_DW2))<<2)|((digitalRead(MON_DW1))<<1)|((digitalRead(MON_DW0))<<0); beam_written &=0x3F; char beam_tx = 0; beam_tx = beam_written+33;//The char send corresponds to the encoded character that means the actual beam ResetWatchDogTimer(); sprintf(tx_buffer,"1%c",beam_tx);
RestMan Library¶
Has not changed.
Watchdog Library¶
Has not changed.
LocalRemote_Man Library¶
This library defines 14 constants, 16 variables and 21 functions. The reading and control of the three new buttons have the development inside this library. The functions are the following:
*void config_SW(void): Define the type of pins used, all as input with pull-up
*void debounceSW_UP(void): Debounce the SW_UP.
*void debounceSW_DW(void): Debounce the SW_DW.
*void debounceSW_LR(void): Debounce the SW_LR.
*void readSW_UPDW(void): Read the state of the switches UP and DW.
*void readSW_UPDWLR(void): Read the state of the switch LR.
*unsigned long time_press_up(void): Give the time between the detection of the button and the current time of evaluation for the switch up.
*unsigned long time_press_dw(void): Give the time between the detection of the button and the current time of evaluation for the switch down.
*unsigned long time_press_lr(void): Give the time between the detection of the button and the current time of evaluation for the switch lr.
*unsigned long time_press_sim(void): Give the time between the detection of the button and the current time of evaluation for the switch up and down pressed simultaneously.
*unsigned long time_release_up(void):Give the time between the detection of the button release and the current time of evaluation for the switch up.
*unsigned long time_release_dw(void):Give the time between the detection of the button release and the current time of evaluation for the switch down.
*unsigned long time_release_lr(void):Give the time between the detection of the button release and the current time of evaluation for the switch lr.
*void exe_up(void): Execute the effect of the up switch.
*void exe_dw(void): Execute the effect of the down switch.
*void exe_lr(void): Execute the effect of the lr switch.
*void exe_sim(void): Execute the effect of the simultaneous press buttons.
*void actualiza_up_pins(uint8_t valor): Update the information related to the UP pins.
*void actualiza_dw_pins(uint8_t valor): Update the information related to the UP pins.
*void actualiza_lr_mens(int estado): Update the information related to the UP pins.
*void check_return_to_remote(void): Evaluate and execute the return to the remote state.