CEBF746 Module.. PC <--> This Module (SPI Master) <-->
Dependencies: cube_CEBF746 cube_crc_16 mbed
main.cpp@6:a98f9d63f8a2, 2016-10-19 (annotated)
- Committer:
- gandol2
- Date:
- Wed Oct 19 08:52:35 2016 +0000
- Revision:
- 6:a98f9d63f8a2
- Parent:
- 5:589ab465ed00
- Child:
- 7:efe7a78d7724
implement
; - MENU_READ_STATUS_REG
; - MENU_SPI_SELF_TEST_WRITE
; - MENU_SPI_SELF_TEST_READ
; - MENU_SPI_WRITE_ENC_DATA
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gandol2 | 0:9a61123385e9 | 1 | // firmware for NUCLEO-F746ZG |
gandol2 | 0:9a61123385e9 | 2 | // ======== SPI Master Pin |
gandol2 | 0:9a61123385e9 | 3 | // PA5 - SCK |
gandol2 | 0:9a61123385e9 | 4 | // PA6 - MISO |
gandol2 | 0:9a61123385e9 | 5 | // PA7 - MOSI |
gandol2 | 0:9a61123385e9 | 6 | // PA14 - SEL |
gandol2 | 0:9a61123385e9 | 7 | |
gandol2 | 0:9a61123385e9 | 8 | #include "mbed.h" |
gandol2 | 6:a98f9d63f8a2 | 9 | #include "lib_CEBF746.h" |
gandol2 | 6:a98f9d63f8a2 | 10 | #include "lib_crc.h" |
gandol2 | 0:9a61123385e9 | 11 | |
gandol2 | 0:9a61123385e9 | 12 | #define DEBUG_SPI |
gandol2 | 0:9a61123385e9 | 13 | #ifdef DEBUG_SPI |
gandol2 | 0:9a61123385e9 | 14 | #define PRINTD(arg1,arg2...) printf(arg1,##arg2) |
gandol2 | 0:9a61123385e9 | 15 | #endif |
gandol2 | 0:9a61123385e9 | 16 | |
gandol2 | 5:589ab465ed00 | 17 | // ======== SPI Func define |
gandol2 | 0:9a61123385e9 | 18 | #define EEPROM_WREN 0x06 // Write Enable |
gandol2 | 0:9a61123385e9 | 19 | #define EEPROM_WRDI 0x04 // Write Disable |
gandol2 | 0:9a61123385e9 | 20 | #define EEPROM_RDSR 0x05 // Read Status Register |
gandol2 | 0:9a61123385e9 | 21 | #define EEPROM_WRSR 0x01 // Write Status Register |
gandol2 | 0:9a61123385e9 | 22 | #define EEPROM_READ 0x03 // Read EEPROM Memory |
gandol2 | 0:9a61123385e9 | 23 | #define EEPROM_WRITE 0x02 // Write EEPROM Memory |
gandol2 | 0:9a61123385e9 | 24 | #define EEPROM_MULTIREAD 0x07 // Write EEPROM Memory |
gandol2 | 0:9a61123385e9 | 25 | |
gandol2 | 5:589ab465ed00 | 26 | #define SPI_CONFIG_BIT 8 |
gandol2 | 5:589ab465ed00 | 27 | #define SPI_CONFIG_FREQUENCY 1000000 // 1Mhz |
gandol2 | 5:589ab465ed00 | 28 | //#define SPI_CONFIG_FREQUENCY 50000000 // 50Mhz |
gandol2 | 0:9a61123385e9 | 29 | |
gandol2 | 6:a98f9d63f8a2 | 30 | |
gandol2 | 5:589ab465ed00 | 31 | |
gandol2 | 6:a98f9d63f8a2 | 32 | Serial pc_serial(USBTX, USBRX); |
gandol2 | 0:9a61123385e9 | 33 | |
gandol2 | 6:a98f9d63f8a2 | 34 | typedef enum |
gandol2 | 5:589ab465ed00 | 35 | { |
gandol2 | 6:a98f9d63f8a2 | 36 | MENU_READ_STATUS_REG = 1, |
gandol2 | 6:a98f9d63f8a2 | 37 | MENU_SPI_SELF_TEST_WRITE = 2, |
gandol2 | 6:a98f9d63f8a2 | 38 | MENU_SPI_SELF_TEST_READ = 3, |
gandol2 | 6:a98f9d63f8a2 | 39 | MENU_SPI_WRITE_ENC_DATA = 4, |
gandol2 | 6:a98f9d63f8a2 | 40 | MENU_SPI_READ_ENC_DATA = 5, |
gandol2 | 6:a98f9d63f8a2 | 41 | |
gandol2 | 5:589ab465ed00 | 42 | MENU_EXIT_Program = 9 |
gandol2 | 6:a98f9d63f8a2 | 43 | }cebf746_command; |
gandol2 | 5:589ab465ed00 | 44 | |
gandol2 | 5:589ab465ed00 | 45 | /** @brief print menu |
gandol2 | 5:589ab465ed00 | 46 | * |
gandol2 | 5:589ab465ed00 | 47 | */ |
gandol2 | 0:9a61123385e9 | 48 | void print_menu(void) |
gandol2 | 0:9a61123385e9 | 49 | { |
gandol2 | 5:589ab465ed00 | 50 | pc_serial.printf("\n\n\n"); |
gandol2 | 6:a98f9d63f8a2 | 51 | pc_serial.printf("-----------[CEBF746 Test MENU]----------\n"); |
gandol2 | 6:a98f9d63f8a2 | 52 | // CEBF746 func ### |
gandol2 | 6:a98f9d63f8a2 | 53 | |
gandol2 | 6:a98f9d63f8a2 | 54 | |
gandol2 | 6:a98f9d63f8a2 | 55 | pc_serial.printf("%d) Read Status Reg\n", MENU_READ_STATUS_REG); |
gandol2 | 6:a98f9d63f8a2 | 56 | pc_serial.printf("%d) Self Test(Write)\n", MENU_SPI_SELF_TEST_WRITE); |
gandol2 | 6:a98f9d63f8a2 | 57 | pc_serial.printf("%d) Self Test(Read)\n", MENU_SPI_SELF_TEST_READ); |
gandol2 | 6:a98f9d63f8a2 | 58 | pc_serial.printf("%d) Encrypt Data Write(16Byte)\n", MENU_SPI_WRITE_ENC_DATA); |
gandol2 | 6:a98f9d63f8a2 | 59 | pc_serial.printf("%d) Encrypted Data Read(16Byte)\n", MENU_SPI_READ_ENC_DATA); |
gandol2 | 5:589ab465ed00 | 60 | // cubebite test func ### |
gandol2 | 6:a98f9d63f8a2 | 61 | |
gandol2 | 5:589ab465ed00 | 62 | |
gandol2 | 5:589ab465ed00 | 63 | // exit func ### |
gandol2 | 5:589ab465ed00 | 64 | pc_serial.printf("%d) Exit program\n", MENU_EXIT_Program); |
gandol2 | 6:a98f9d63f8a2 | 65 | pc_serial.printf("----------------------------------------\n"); |
gandol2 | 5:589ab465ed00 | 66 | pc_serial.printf("input menu : "); |
gandol2 | 0:9a61123385e9 | 67 | } |
gandol2 | 0:9a61123385e9 | 68 | |
gandol2 | 5:589ab465ed00 | 69 | |
gandol2 | 5:589ab465ed00 | 70 | /** @brief convert ASCII to hex |
gandol2 | 5:589ab465ed00 | 71 | * |
gandol2 | 5:589ab465ed00 | 72 | * @param convertedData converted Data |
gandol2 | 5:589ab465ed00 | 73 | * @param sourceBuf ASCII data array |
gandol2 | 5:589ab465ed00 | 74 | * @param lenght sourceBuf length |
gandol2 | 5:589ab465ed00 | 75 | * @return 0 is valid hex format, other is error |
gandol2 | 5:589ab465ed00 | 76 | */ |
gandol2 | 0:9a61123385e9 | 77 | int converHex(char * convertedData, char * sourceBuf, int length) |
gandol2 | 0:9a61123385e9 | 78 | { |
gandol2 | 0:9a61123385e9 | 79 | int ret = 0; |
gandol2 | 0:9a61123385e9 | 80 | char tempBuf[length]; |
gandol2 | 0:9a61123385e9 | 81 | *convertedData = 0; |
gandol2 | 5:589ab465ed00 | 82 | |
gandol2 | 5:589ab465ed00 | 83 | for (int iCnt = 0; iCnt < length; iCnt++) |
gandol2 | 0:9a61123385e9 | 84 | { |
gandol2 | 5:589ab465ed00 | 85 | if (('0' <= *(sourceBuf + iCnt)) && ('9' >= *(sourceBuf + iCnt))) |
gandol2 | 0:9a61123385e9 | 86 | { |
gandol2 | 5:589ab465ed00 | 87 | tempBuf[iCnt] = (*(sourceBuf + iCnt) - 48); |
gandol2 | 0:9a61123385e9 | 88 | } |
gandol2 | 5:589ab465ed00 | 89 | else if (('A' <= *(sourceBuf + iCnt)) && ('F' >= *(sourceBuf + iCnt))) |
gandol2 | 0:9a61123385e9 | 90 | { |
gandol2 | 5:589ab465ed00 | 91 | tempBuf[iCnt] = (*(sourceBuf + iCnt) - 55); |
gandol2 | 0:9a61123385e9 | 92 | } |
gandol2 | 5:589ab465ed00 | 93 | else if (('a' <= *(sourceBuf + iCnt)) && ('f' >= *(sourceBuf + iCnt))) |
gandol2 | 5:589ab465ed00 | 94 | { |
gandol2 | 5:589ab465ed00 | 95 | tempBuf[iCnt] = (*(sourceBuf + iCnt) - 87); |
gandol2 | 0:9a61123385e9 | 96 | } |
gandol2 | 0:9a61123385e9 | 97 | else // error |
gandol2 | 0:9a61123385e9 | 98 | { |
gandol2 | 0:9a61123385e9 | 99 | ret = -1; |
gandol2 | 5:589ab465ed00 | 100 | return ret; |
gandol2 | 5:589ab465ed00 | 101 | } |
gandol2 | 0:9a61123385e9 | 102 | } |
gandol2 | 5:589ab465ed00 | 103 | |
gandol2 | 0:9a61123385e9 | 104 | //pc_serial.printf("[TEST] tempBuf[0] = 0x%02X\n", tempBuf[0]); |
gandol2 | 0:9a61123385e9 | 105 | //pc_serial.printf("[TEST] tempBuf[1] = 0x%02X\n", tempBuf[1]); |
gandol2 | 0:9a61123385e9 | 106 | *convertedData = ((tempBuf[0] & 0x0F) << 4) | (tempBuf[1] & 0x0F); |
gandol2 | 0:9a61123385e9 | 107 | //pc_serial.printf("[TEST] convertedData = 0x%02X\n", *convertedData); |
gandol2 | 0:9a61123385e9 | 108 | return ret; |
gandol2 | 0:9a61123385e9 | 109 | } |
gandol2 | 0:9a61123385e9 | 110 | |
gandol2 | 6:a98f9d63f8a2 | 111 | |
gandol2 | 6:a98f9d63f8a2 | 112 | |
gandol2 | 6:a98f9d63f8a2 | 113 | |
gandol2 | 6:a98f9d63f8a2 | 114 | |
gandol2 | 6:a98f9d63f8a2 | 115 | |
gandol2 | 6:a98f9d63f8a2 | 116 | |
gandol2 | 5:589ab465ed00 | 117 | /** @brief main function ################################################################### |
gandol2 | 5:589ab465ed00 | 118 | * |
gandol2 | 5:589ab465ed00 | 119 | */ |
gandol2 | 0:9a61123385e9 | 120 | int main() |
gandol2 | 0:9a61123385e9 | 121 | { |
gandol2 | 6:a98f9d63f8a2 | 122 | uint16_t tempCrc; |
gandol2 | 6:a98f9d63f8a2 | 123 | char ret = 0; |
gandol2 | 6:a98f9d63f8a2 | 124 | char retCode; |
gandol2 | 5:589ab465ed00 | 125 | char inputMenuNum = 0; |
gandol2 | 6:a98f9d63f8a2 | 126 | spiDataStr sendData; |
gandol2 | 6:a98f9d63f8a2 | 127 | spiDataStr reciveData; |
gandol2 | 6:a98f9d63f8a2 | 128 | |
gandol2 | 6:a98f9d63f8a2 | 129 | uint8_t spiMOSIBuf[255]; |
gandol2 | 6:a98f9d63f8a2 | 130 | uint8_t spiMISOBuf[255]; |
gandol2 | 6:a98f9d63f8a2 | 131 | |
gandol2 | 5:589ab465ed00 | 132 | |
gandol2 | 6:a98f9d63f8a2 | 133 | |
gandol2 | 6:a98f9d63f8a2 | 134 | cebf746_use_init(); |
gandol2 | 5:589ab465ed00 | 135 | |
gandol2 | 6:a98f9d63f8a2 | 136 | pc_serial.printf("\n\n========== SPI Master for CEBF746 [Start] ==========\n"); |
gandol2 | 5:589ab465ed00 | 137 | |
gandol2 | 5:589ab465ed00 | 138 | while (1) |
gandol2 | 5:589ab465ed00 | 139 | { |
gandol2 | 5:589ab465ed00 | 140 | print_menu(); |
gandol2 | 5:589ab465ed00 | 141 | inputMenuNum = pc_serial.getc(); |
gandol2 | 5:589ab465ed00 | 142 | |
gandol2 | 5:589ab465ed00 | 143 | pc_serial.printf("[DEBUG] input menu number = %c\n", inputMenuNum); |
gandol2 | 5:589ab465ed00 | 144 | |
gandol2 | 5:589ab465ed00 | 145 | if (('0' < inputMenuNum) && ('9' >= inputMenuNum)) |
gandol2 | 5:589ab465ed00 | 146 | { |
gandol2 | 0:9a61123385e9 | 147 | inputMenuNum = inputMenuNum - 48; |
gandol2 | 5:589ab465ed00 | 148 | } |
gandol2 | 5:589ab465ed00 | 149 | else |
gandol2 | 5:589ab465ed00 | 150 | { |
gandol2 | 5:589ab465ed00 | 151 | pc_serial.printf("[INFO] correct input menu number.. please retry..\n"); |
gandol2 | 5:589ab465ed00 | 152 | wait(1); |
gandol2 | 5:589ab465ed00 | 153 | continue; |
gandol2 | 5:589ab465ed00 | 154 | } |
gandol2 | 5:589ab465ed00 | 155 | |
gandol2 | 6:a98f9d63f8a2 | 156 | |
gandol2 | 6:a98f9d63f8a2 | 157 | |
gandol2 | 6:a98f9d63f8a2 | 158 | |
gandol2 | 6:a98f9d63f8a2 | 159 | |
gandol2 | 6:a98f9d63f8a2 | 160 | memset(spiMISOBuf, 0, 255); |
gandol2 | 6:a98f9d63f8a2 | 161 | memset(spiMOSIBuf, 0, 255); |
gandol2 | 6:a98f9d63f8a2 | 162 | retCode = 0xFF; |
gandol2 | 5:589ab465ed00 | 163 | switch (inputMenuNum) |
gandol2 | 5:589ab465ed00 | 164 | { |
gandol2 | 6:a98f9d63f8a2 | 165 | |
gandol2 | 6:a98f9d63f8a2 | 166 | case MENU_READ_STATUS_REG: // Write Enable =================================[OK] |
gandol2 | 6:a98f9d63f8a2 | 167 | pc_serial.printf("[DEBUG] Read Status Reg..\n"); |
gandol2 | 6:a98f9d63f8a2 | 168 | ret = 0; |
gandol2 | 6:a98f9d63f8a2 | 169 | ret = cebf746_packet_read(FUNC_READ_STATUS, 0); |
gandol2 | 6:a98f9d63f8a2 | 170 | printf("[INFO] status reg [%02X]\n", ret); |
gandol2 | 5:589ab465ed00 | 171 | break; |
gandol2 | 6:a98f9d63f8a2 | 172 | |
gandol2 | 6:a98f9d63f8a2 | 173 | |
gandol2 | 6:a98f9d63f8a2 | 174 | case MENU_SPI_SELF_TEST_WRITE: // 161017_KSS_Test OK |
gandol2 | 6:a98f9d63f8a2 | 175 | char spiSelfTestBuf[CEB_BUF_SIZE] = WRITE_SELF_TEST_DATA; |
gandol2 | 6:a98f9d63f8a2 | 176 | |
gandol2 | 6:a98f9d63f8a2 | 177 | sendData.size = sizeof(spiSelfTestBuf); |
gandol2 | 6:a98f9d63f8a2 | 178 | sendData.buf = (uint8_t*)spiSelfTestBuf; |
gandol2 | 6:a98f9d63f8a2 | 179 | sendData.crc16 = 0; |
gandol2 | 5:589ab465ed00 | 180 | |
gandol2 | 6:a98f9d63f8a2 | 181 | ret = cebf746_packet_write(FUNC_WRITE_SELF_TEST, &sendData); |
gandol2 | 6:a98f9d63f8a2 | 182 | /* |
gandol2 | 6:a98f9d63f8a2 | 183 | cebf746_print_packet(&sendData); |
gandol2 | 6:a98f9d63f8a2 | 184 | |
gandol2 | 6:a98f9d63f8a2 | 185 | pc_serial.printf("FUNC_WRITE_SELF_TEST.."); |
gandol2 | 6:a98f9d63f8a2 | 186 | if(0 == ret) |
gandol2 | 6:a98f9d63f8a2 | 187 | { |
gandol2 | 6:a98f9d63f8a2 | 188 | pc_serial.printf("[SUCESS] ret = %02X\n", ret); |
gandol2 | 6:a98f9d63f8a2 | 189 | } |
gandol2 | 6:a98f9d63f8a2 | 190 | else |
gandol2 | 6:a98f9d63f8a2 | 191 | { |
gandol2 | 6:a98f9d63f8a2 | 192 | pc_serial.printf("[FAIL] ******** ret = %02X ******** \n", ret); |
gandol2 | 6:a98f9d63f8a2 | 193 | } |
gandol2 | 6:a98f9d63f8a2 | 194 | */ |
gandol2 | 5:589ab465ed00 | 195 | break; |
gandol2 | 6:a98f9d63f8a2 | 196 | |
gandol2 | 6:a98f9d63f8a2 | 197 | case MENU_SPI_SELF_TEST_READ: // 161017_KSS_Test OK |
gandol2 | 6:a98f9d63f8a2 | 198 | char selfTempRxBuf[CEB_BUF_SIZE]={0,}; |
gandol2 | 6:a98f9d63f8a2 | 199 | |
gandol2 | 6:a98f9d63f8a2 | 200 | reciveData.size = CEB_BUF_SIZE; |
gandol2 | 6:a98f9d63f8a2 | 201 | reciveData.buf = (uint8_t*)selfTempRxBuf; |
gandol2 | 6:a98f9d63f8a2 | 202 | sendData.crc16 = 0; |
gandol2 | 6:a98f9d63f8a2 | 203 | |
gandol2 | 6:a98f9d63f8a2 | 204 | ret = cebf746_packet_read(FUNC_READ_SELF_TEST, &reciveData); |
gandol2 | 6:a98f9d63f8a2 | 205 | |
gandol2 | 6:a98f9d63f8a2 | 206 | break; |
gandol2 | 6:a98f9d63f8a2 | 207 | |
gandol2 | 6:a98f9d63f8a2 | 208 | |
gandol2 | 6:a98f9d63f8a2 | 209 | case MENU_SPI_WRITE_ENC_DATA: |
gandol2 | 6:a98f9d63f8a2 | 210 | uint8_t encTempBuf[CEB_BUF_SIZE] = {0, }; |
gandol2 | 6:a98f9d63f8a2 | 211 | |
gandol2 | 6:a98f9d63f8a2 | 212 | pc_serial.printf("input Encrypt String (16 character) : "); |
gandol2 | 6:a98f9d63f8a2 | 213 | for(int iCnt = 0 ; iCnt < 16 ; ++iCnt) |
gandol2 | 6:a98f9d63f8a2 | 214 | { |
gandol2 | 6:a98f9d63f8a2 | 215 | encTempBuf[iCnt] = pc_serial.getc(); |
gandol2 | 6:a98f9d63f8a2 | 216 | pc_serial.printf("%c", encTempBuf[iCnt]); |
gandol2 | 6:a98f9d63f8a2 | 217 | } |
gandol2 | 6:a98f9d63f8a2 | 218 | |
gandol2 | 6:a98f9d63f8a2 | 219 | sendData.size = sizeof(encTempBuf); |
gandol2 | 6:a98f9d63f8a2 | 220 | sendData.buf = (uint8_t*)encTempBuf; |
gandol2 | 6:a98f9d63f8a2 | 221 | sendData.crc16 = 0; |
gandol2 | 6:a98f9d63f8a2 | 222 | |
gandol2 | 6:a98f9d63f8a2 | 223 | ret = cebf746_packet_write(FUNC_WRITE_ENC_DATA, &sendData); |
gandol2 | 6:a98f9d63f8a2 | 224 | |
gandol2 | 6:a98f9d63f8a2 | 225 | break; |
gandol2 | 6:a98f9d63f8a2 | 226 | |
gandol2 | 6:a98f9d63f8a2 | 227 | |
gandol2 | 6:a98f9d63f8a2 | 228 | case MENU_SPI_READ_ENC_DATA: |
gandol2 | 6:a98f9d63f8a2 | 229 | int encryptWaitCnt = 10; |
gandol2 | 6:a98f9d63f8a2 | 230 | while(1) |
gandol2 | 5:589ab465ed00 | 231 | { |
gandol2 | 6:a98f9d63f8a2 | 232 | ret = cebf746_packet_read(FUNC_READ_STATUS, 0); |
gandol2 | 6:a98f9d63f8a2 | 233 | if(ret & 0x02) // Encrypting.. |
gandol2 | 5:589ab465ed00 | 234 | { |
gandol2 | 6:a98f9d63f8a2 | 235 | --encryptWaitCnt; |
gandol2 | 5:589ab465ed00 | 236 | } |
gandol2 | 6:a98f9d63f8a2 | 237 | else |
gandol2 | 5:589ab465ed00 | 238 | { |
gandol2 | 5:589ab465ed00 | 239 | break; |
gandol2 | 5:589ab465ed00 | 240 | } |
gandol2 | 5:589ab465ed00 | 241 | } |
gandol2 | 6:a98f9d63f8a2 | 242 | |
gandol2 | 6:a98f9d63f8a2 | 243 | if(0 == encryptWaitCnt) |
gandol2 | 6:a98f9d63f8a2 | 244 | { |
gandol2 | 6:a98f9d63f8a2 | 245 | printf("[INFO] The CEBF746 is running\n"); |
gandol2 | 6:a98f9d63f8a2 | 246 | continue; |
gandol2 | 6:a98f9d63f8a2 | 247 | } |
gandol2 | 6:a98f9d63f8a2 | 248 | else |
gandol2 | 5:589ab465ed00 | 249 | { |
gandol2 | 6:a98f9d63f8a2 | 250 | /* 161019_암호화된 데이터 읽어와야함. 슬레이브도 구현 해야함 */ |
gandol2 | 5:589ab465ed00 | 251 | } |
gandol2 | 6:a98f9d63f8a2 | 252 | |
gandol2 | 6:a98f9d63f8a2 | 253 | |
gandol2 | 6:a98f9d63f8a2 | 254 | |
gandol2 | 6:a98f9d63f8a2 | 255 | /* |
gandol2 | 6:a98f9d63f8a2 | 256 | uint8_t encTempBuf[CEB_BUF_SIZE] = {0, }; |
gandol2 | 6:a98f9d63f8a2 | 257 | |
gandol2 | 6:a98f9d63f8a2 | 258 | pc_serial.printf("input Encrypt String (16 character) : "); |
gandol2 | 6:a98f9d63f8a2 | 259 | for(int iCnt = 0 ; iCnt < 16 ; ++iCnt) |
gandol2 | 6:a98f9d63f8a2 | 260 | { |
gandol2 | 6:a98f9d63f8a2 | 261 | encTempBuf[iCnt] = pc_serial.getc(); |
gandol2 | 6:a98f9d63f8a2 | 262 | pc_serial.printf("%c", encTempBuf[iCnt]); |
gandol2 | 6:a98f9d63f8a2 | 263 | } |
gandol2 | 6:a98f9d63f8a2 | 264 | |
gandol2 | 6:a98f9d63f8a2 | 265 | sendData.size = sizeof(encTempBuf); |
gandol2 | 6:a98f9d63f8a2 | 266 | sendData.buf = (uint8_t*)encTempBuf; |
gandol2 | 6:a98f9d63f8a2 | 267 | sendData.crc16 = 0; |
gandol2 | 6:a98f9d63f8a2 | 268 | |
gandol2 | 6:a98f9d63f8a2 | 269 | ret = cebf746_packet_write(FUNC_WRITE_ENC_DATA, &sendData); |
gandol2 | 6:a98f9d63f8a2 | 270 | */ |
gandol2 | 5:589ab465ed00 | 271 | break; |
gandol2 | 5:589ab465ed00 | 272 | |
gandol2 | 5:589ab465ed00 | 273 | |
gandol2 | 5:589ab465ed00 | 274 | case MENU_EXIT_Program: |
gandol2 | 6:a98f9d63f8a2 | 275 | |
gandol2 | 5:589ab465ed00 | 276 | pc_serial.printf("exit program... thank you\n"); |
gandol2 | 5:589ab465ed00 | 277 | //return 0; |
gandol2 | 5:589ab465ed00 | 278 | |
gandol2 | 0:9a61123385e9 | 279 | } |
gandol2 | 6:a98f9d63f8a2 | 280 | |
gandol2 | 5:589ab465ed00 | 281 | |
gandol2 | 0:9a61123385e9 | 282 | } |
gandol2 | 5:589ab465ed00 | 283 | |
gandol2 | 0:9a61123385e9 | 284 | return 0; |
gandol2 | 0:9a61123385e9 | 285 | } |