A program to measure the temperature using the Max6675 board. The temperature is shown on 8x8 Max7219 matrix display and it is saved on SD as well.
Dependencies: MAX7219 SDFileSystem mbed
Fork of MAXREFDES99_demo by
The program measures the temperature using the Max6675 board designed for Arduino. The temperature is shown on Max7219 8x8 matrix display (designed for Arduino as well) as text marque from right to left. The fonf size is 5x7 so the last row is used to show some info:
- All leds off: Normal temperature measuring - Leds shifting: Saving on SD card - Leds blinking: SD card missing or damaged
The Blue "user button" is used to save measured temperature on SD card. First click start saving, the second stop the process. Together the temperature is saved also the time. The time is reset when the process start. Connecting the USB to PC it's possible to see instant temperature and all saved data on SD.
maxrefdes99.h@6:00aabe967e51, 2016-04-27 (annotated)
- Committer:
- pradipv
- Date:
- Wed Apr 27 10:27:34 2016 +0000
- Revision:
- 6:00aabe967e51
- Parent:
- 3:41bdbc9b3cec
- Child:
- 8:a6a0c9e280ae
version 0.2 - Updated with manual 16x16 font data
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
j3 | 0:6b0161c3e440 | 1 | /******************************************************************//** |
j3 | 0:6b0161c3e440 | 2 | * @file maxrefdes99.h |
j3 | 0:6b0161c3e440 | 3 | * |
j3 | 0:6b0161c3e440 | 4 | * @author Justin Jordan |
j3 | 0:6b0161c3e440 | 5 | * |
pradipv | 6:00aabe967e51 | 6 | * @version 0.2 |
j3 | 0:6b0161c3e440 | 7 | * |
j3 | 0:6b0161c3e440 | 8 | * Started: 08JAN16 |
j3 | 0:6b0161c3e440 | 9 | * |
pradipv | 6:00aabe967e51 | 10 | * Updated: 26 APR16,Pradip Vatharkar |
j3 | 0:6b0161c3e440 | 11 | * |
pradipv | 6:00aabe967e51 | 12 | * @brief Source file for maxrefdes99 demo with 5x7, 16x16 aerial bold |
pradipv | 6:00aabe967e51 | 13 | * and 16x16 manual fonts |
j3 | 0:6b0161c3e440 | 14 | *********************************************************************** |
j3 | 0:6b0161c3e440 | 15 | * Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved. |
j3 | 0:6b0161c3e440 | 16 | * |
j3 | 0:6b0161c3e440 | 17 | * Permission is hereby granted, free of charge, to any person obtaining a |
j3 | 0:6b0161c3e440 | 18 | * copy of this software and associated documentation files (the "Software"), |
j3 | 0:6b0161c3e440 | 19 | * to deal in the Software without restriction, including without limitation |
j3 | 0:6b0161c3e440 | 20 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
j3 | 0:6b0161c3e440 | 21 | * and/or sell copies of the Software, and to permit persons to whom the |
j3 | 0:6b0161c3e440 | 22 | * Software is furnished to do so, subject to the following conditions: |
j3 | 0:6b0161c3e440 | 23 | * |
j3 | 0:6b0161c3e440 | 24 | * The above copyright notice and this permission notice shall be included |
j3 | 0:6b0161c3e440 | 25 | * in all copies or substantial portions of the Software. |
j3 | 0:6b0161c3e440 | 26 | * |
j3 | 0:6b0161c3e440 | 27 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
j3 | 0:6b0161c3e440 | 28 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
j3 | 0:6b0161c3e440 | 29 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
j3 | 0:6b0161c3e440 | 30 | * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES |
j3 | 0:6b0161c3e440 | 31 | * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
j3 | 0:6b0161c3e440 | 32 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
j3 | 0:6b0161c3e440 | 33 | * OTHER DEALINGS IN THE SOFTWARE. |
j3 | 0:6b0161c3e440 | 34 | * |
j3 | 0:6b0161c3e440 | 35 | * Except as contained in this notice, the name of Maxim Integrated |
j3 | 0:6b0161c3e440 | 36 | * Products, Inc. shall not be used except as stated in the Maxim Integrated |
j3 | 0:6b0161c3e440 | 37 | * Products, Inc. Branding Policy. |
j3 | 0:6b0161c3e440 | 38 | * |
j3 | 0:6b0161c3e440 | 39 | * The mere transfer of this software does not imply any licenses |
j3 | 0:6b0161c3e440 | 40 | * of trade secrets, proprietary technology, copyrights, patents, |
j3 | 0:6b0161c3e440 | 41 | * trademarks, maskwork rights, or any other form of intellectual |
j3 | 0:6b0161c3e440 | 42 | * property whatsoever. Maxim Integrated Products, Inc. retains all |
j3 | 0:6b0161c3e440 | 43 | * ownership rights. |
j3 | 0:6b0161c3e440 | 44 | **********************************************************************/ |
j3 | 0:6b0161c3e440 | 45 | |
j3 | 0:6b0161c3e440 | 46 | |
j3 | 0:6b0161c3e440 | 47 | #ifndef MAXREFDES99_H |
j3 | 0:6b0161c3e440 | 48 | #define MAXREFDES99_H |
j3 | 0:6b0161c3e440 | 49 | |
j3 | 0:6b0161c3e440 | 50 | |
j3 | 0:6b0161c3e440 | 51 | #include "mbed.h" |
j3 | 0:6b0161c3e440 | 52 | #include "max7219.h" |
j3 | 0:6b0161c3e440 | 53 | |
j3 | 0:6b0161c3e440 | 54 | |
j3 | 1:06c0a61ca171 | 55 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 56 | * @brief gets character bitmap fom memory |
j3 | 1:06c0a61ca171 | 57 | * |
j3 | 1:06c0a61ca171 | 58 | * @details |
j3 | 1:06c0a61ca171 | 59 | * |
j3 | 1:06c0a61ca171 | 60 | * On Entry: |
j3 | 1:06c0a61ca171 | 61 | * @param[in] c - character to get bitmap for |
j3 | 1:06c0a61ca171 | 62 | * @param[in] char_buff - pointer to buffer to store bitmap in |
j3 | 1:06c0a61ca171 | 63 | * must be at least 6 bytes |
j3 | 1:06c0a61ca171 | 64 | * |
j3 | 1:06c0a61ca171 | 65 | * On Exit: |
j3 | 1:06c0a61ca171 | 66 | * @return none |
j3 | 1:06c0a61ca171 | 67 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 68 | void get_5x7_character(char c, uint8_t *char_buff); |
j3 | 0:6b0161c3e440 | 69 | |
j3 | 0:6b0161c3e440 | 70 | |
j3 | 1:06c0a61ca171 | 71 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 72 | * @brief prints character to MAXREFDES99 at given position |
j3 | 1:06c0a61ca171 | 73 | * |
j3 | 1:06c0a61ca171 | 74 | * @details |
j3 | 1:06c0a61ca171 | 75 | * |
j3 | 1:06c0a61ca171 | 76 | * On Entry: |
j3 | 1:06c0a61ca171 | 77 | * @param[in] p_display - pointer to Max7219 object |
j3 | 1:06c0a61ca171 | 78 | * @param[in] position - position to print char to |
j3 | 1:06c0a61ca171 | 79 | * posiion 1 is top left column, position 32 |
j3 | 1:06c0a61ca171 | 80 | * is bottom right column |
j3 | 1:06c0a61ca171 | 81 | * @param[in] c - char to print |
j3 | 1:06c0a61ca171 | 82 | * |
j3 | 1:06c0a61ca171 | 83 | * On Exit: |
j3 | 1:06c0a61ca171 | 84 | * @return none |
j3 | 1:06c0a61ca171 | 85 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 86 | void print_char(Max7219 *p_display, uint8_t position, char c); |
j3 | 0:6b0161c3e440 | 87 | |
j3 | 0:6b0161c3e440 | 88 | |
j3 | 1:06c0a61ca171 | 89 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 90 | * @brief prints given string to MAXREFDES99 at given position |
j3 | 1:06c0a61ca171 | 91 | * |
j3 | 1:06c0a61ca171 | 92 | * @details |
j3 | 1:06c0a61ca171 | 93 | * |
j3 | 1:06c0a61ca171 | 94 | * On Entry: |
j3 | 1:06c0a61ca171 | 95 | * @param[in] p_display - pointer to Max7219 object |
j3 | 1:06c0a61ca171 | 96 | * @param[in] position - position to print char to |
j3 | 1:06c0a61ca171 | 97 | * posiion 1 is top left column, position 32 |
j3 | 1:06c0a61ca171 | 98 | * is bottom right column |
j3 | 1:06c0a61ca171 | 99 | * @param[in] s - pointer to string to print |
j3 | 1:06c0a61ca171 | 100 | * |
j3 | 1:06c0a61ca171 | 101 | * On Exit: |
j3 | 1:06c0a61ca171 | 102 | * @return none |
j3 | 1:06c0a61ca171 | 103 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 104 | void print_string(Max7219 *p_display, uint8_t position, const char *s); |
j3 | 0:6b0161c3e440 | 105 | |
j3 | 0:6b0161c3e440 | 106 | |
j3 | 1:06c0a61ca171 | 107 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 108 | * @brief shifts display right 'count' positions with given |
j3 | 1:06c0a61ca171 | 109 | * delay between shifts |
j3 | 1:06c0a61ca171 | 110 | * |
j3 | 1:06c0a61ca171 | 111 | * @details |
j3 | 1:06c0a61ca171 | 112 | * |
j3 | 1:06c0a61ca171 | 113 | * On Entry: |
j3 | 1:06c0a61ca171 | 114 | * @param[in] p_display - pointer to Max7219 object |
j3 | 1:06c0a61ca171 | 115 | * @param[in] count - number of positions to shift |
j3 | 1:06c0a61ca171 | 116 | * @param[in] delay - delay between shifts |
j3 | 1:06c0a61ca171 | 117 | * |
j3 | 1:06c0a61ca171 | 118 | * On Exit: |
j3 | 1:06c0a61ca171 | 119 | * @return none |
j3 | 1:06c0a61ca171 | 120 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 121 | void shift_display_right(Max7219 *p_display, uint8_t count, uint8_t delay); |
j3 | 0:6b0161c3e440 | 122 | |
j3 | 0:6b0161c3e440 | 123 | |
j3 | 1:06c0a61ca171 | 124 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 125 | * @brief shifts display left 'count' positions with given |
j3 | 1:06c0a61ca171 | 126 | * delay between shifts |
j3 | 1:06c0a61ca171 | 127 | * |
j3 | 1:06c0a61ca171 | 128 | * @details |
j3 | 1:06c0a61ca171 | 129 | * |
j3 | 1:06c0a61ca171 | 130 | * On Entry: |
j3 | 1:06c0a61ca171 | 131 | * @param[in] p_display - pointer to Max7219 object |
j3 | 1:06c0a61ca171 | 132 | * @param[in] count - number of positions to shift |
j3 | 1:06c0a61ca171 | 133 | * @param[in] delay - delay between shifts |
j3 | 1:06c0a61ca171 | 134 | * |
j3 | 1:06c0a61ca171 | 135 | * On Exit: |
j3 | 1:06c0a61ca171 | 136 | * @return none |
j3 | 1:06c0a61ca171 | 137 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 138 | void shift_display_left(Max7219 *p_display, uint8_t count, uint8_t delay); |
j3 | 0:6b0161c3e440 | 139 | |
j3 | 0:6b0161c3e440 | 140 | |
j3 | 1:06c0a61ca171 | 141 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 142 | * @brief turns on all leds for given quadrant, with quad 1 being |
j3 | 1:06c0a61ca171 | 143 | * top left and quad 4 being bottom right |
j3 | 1:06c0a61ca171 | 144 | * |
j3 | 1:06c0a61ca171 | 145 | * @details |
j3 | 1:06c0a61ca171 | 146 | * |
j3 | 1:06c0a61ca171 | 147 | * On Entry: |
j3 | 1:06c0a61ca171 | 148 | * @param[in] p_display - pointer to Max7219 object |
j3 | 1:06c0a61ca171 | 149 | * @param[in] quad - see brief |
j3 | 1:06c0a61ca171 | 150 | * |
j3 | 1:06c0a61ca171 | 151 | * On Exit: |
j3 | 1:06c0a61ca171 | 152 | * @return none |
j3 | 1:06c0a61ca171 | 153 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 154 | void quad_all_on(Max7219 *p_display, uint8_t quad); |
j3 | 0:6b0161c3e440 | 155 | |
j3 | 0:6b0161c3e440 | 156 | |
j3 | 1:06c0a61ca171 | 157 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 158 | * @brief turns off all leds for given quadrant, with quad 1 being |
j3 | 1:06c0a61ca171 | 159 | * top left and quad 4 being bottom right |
j3 | 1:06c0a61ca171 | 160 | * |
j3 | 1:06c0a61ca171 | 161 | * @details |
j3 | 1:06c0a61ca171 | 162 | * |
j3 | 1:06c0a61ca171 | 163 | * On Entry: |
j3 | 1:06c0a61ca171 | 164 | * @param[in] p_display - pointer to Max7219 object |
j3 | 1:06c0a61ca171 | 165 | * @param[in] quad - see brief |
j3 | 1:06c0a61ca171 | 166 | * |
j3 | 1:06c0a61ca171 | 167 | * On Exit: |
j3 | 1:06c0a61ca171 | 168 | * @return none |
j3 | 1:06c0a61ca171 | 169 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 170 | void quad_all_off(Max7219 *p_display, uint8_t quad); |
j3 | 0:6b0161c3e440 | 171 | |
j3 | 0:6b0161c3e440 | 172 | |
j3 | 1:06c0a61ca171 | 173 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 174 | * @brief turns all leds for whole display on |
j3 | 1:06c0a61ca171 | 175 | * |
j3 | 1:06c0a61ca171 | 176 | * @details |
j3 | 1:06c0a61ca171 | 177 | * |
j3 | 1:06c0a61ca171 | 178 | * On Entry: |
j3 | 1:06c0a61ca171 | 179 | * @param[in] p_display - pointer to Max7219 object |
j3 | 1:06c0a61ca171 | 180 | * |
j3 | 1:06c0a61ca171 | 181 | * On Exit: |
j3 | 1:06c0a61ca171 | 182 | * @return none |
j3 | 1:06c0a61ca171 | 183 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 184 | void all_on(Max7219 *p_display); |
j3 | 0:6b0161c3e440 | 185 | |
j3 | 0:6b0161c3e440 | 186 | |
j3 | 1:06c0a61ca171 | 187 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 188 | * @brief turns all leds for whole display off |
j3 | 1:06c0a61ca171 | 189 | * |
j3 | 1:06c0a61ca171 | 190 | * @details |
j3 | 1:06c0a61ca171 | 191 | * |
j3 | 1:06c0a61ca171 | 192 | * On Entry: |
j3 | 1:06c0a61ca171 | 193 | * @param[in] p_display - pointer to Max7219 object |
j3 | 1:06c0a61ca171 | 194 | * |
j3 | 1:06c0a61ca171 | 195 | * On Exit: |
j3 | 1:06c0a61ca171 | 196 | * @return none |
j3 | 1:06c0a61ca171 | 197 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 198 | void all_off(Max7219 *p_display); |
j3 | 0:6b0161c3e440 | 199 | |
j3 | 0:6b0161c3e440 | 200 | |
j3 | 1:06c0a61ca171 | 201 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 202 | * @brief demo loop for MAXREFDES99 |
j3 | 1:06c0a61ca171 | 203 | * |
j3 | 1:06c0a61ca171 | 204 | * @details |
j3 | 1:06c0a61ca171 | 205 | * |
j3 | 1:06c0a61ca171 | 206 | * On Entry: |
j3 | 1:06c0a61ca171 | 207 | * @param[in] p_display - pointer to Max7219 object |
j3 | 1:06c0a61ca171 | 208 | * @param[in] display_config - structure holding configuration data |
j3 | 1:06c0a61ca171 | 209 | * @param[in] endless_loop - if true run demo in endless loop |
j3 | 1:06c0a61ca171 | 210 | * |
j3 | 1:06c0a61ca171 | 211 | * On Exit: |
j3 | 1:06c0a61ca171 | 212 | * @return none |
j3 | 1:06c0a61ca171 | 213 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 214 | void demo(Max7219 *display, max7219_configuration_t display_config, bool endless_loop); |
j3 | 0:6b0161c3e440 | 215 | |
j3 | 0:6b0161c3e440 | 216 | |
j3 | 1:06c0a61ca171 | 217 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 218 | * @brief shift display in given direction forever |
j3 | 1:06c0a61ca171 | 219 | * |
j3 | 1:06c0a61ca171 | 220 | * @details |
j3 | 1:06c0a61ca171 | 221 | * |
j3 | 1:06c0a61ca171 | 222 | * On Entry: |
j3 | 1:06c0a61ca171 | 223 | * @param[in] p_display - pointer to Max7219 object |
j3 | 1:06c0a61ca171 | 224 | * @param[in] scroll_right - if true shift right, else shift left |
j3 | 1:06c0a61ca171 | 225 | * |
j3 | 1:06c0a61ca171 | 226 | * On Exit: |
j3 | 1:06c0a61ca171 | 227 | * @return none |
j3 | 1:06c0a61ca171 | 228 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 229 | void endless_scroll_display(Max7219 *display, uint32_t scroll_right); |
j3 | 0:6b0161c3e440 | 230 | |
pradipv | 3:41bdbc9b3cec | 231 | /**********************************************************//** |
pradipv | 3:41bdbc9b3cec | 232 | * @brief gets 16x16 character bitmap fom memory |
pradipv | 3:41bdbc9b3cec | 233 | * |
pradipv | 3:41bdbc9b3cec | 234 | * @details |
pradipv | 3:41bdbc9b3cec | 235 | * |
pradipv | 3:41bdbc9b3cec | 236 | * On Entry: |
pradipv | 3:41bdbc9b3cec | 237 | * @param[in] c - character to get bitmap for |
pradipv | 3:41bdbc9b3cec | 238 | * @param[in] char_buff - pointer to buffer to store bitmap |
pradipv | 3:41bdbc9b3cec | 239 | * Buffer should be 32 bytes |
pradipv | 6:00aabe967e51 | 240 | * @param[in] font_type - 16x16 font type used for display |
pradipv | 3:41bdbc9b3cec | 241 | * On Exit: |
pradipv | 3:41bdbc9b3cec | 242 | * @return none |
pradipv | 3:41bdbc9b3cec | 243 | **************************************************************/ |
pradipv | 6:00aabe967e51 | 244 | void get_16x16_character(char c, uint8_t *char_buff,uint8_t font_type); |
pradipv | 3:41bdbc9b3cec | 245 | |
pradipv | 3:41bdbc9b3cec | 246 | |
pradipv | 3:41bdbc9b3cec | 247 | /**********************************************************//** |
pradipv | 3:41bdbc9b3cec | 248 | * @brief prints character to MAXREFDES99 16x16 LED display |
pradipv | 3:41bdbc9b3cec | 249 | * |
pradipv | 3:41bdbc9b3cec | 250 | * @details |
pradipv | 3:41bdbc9b3cec | 251 | * |
pradipv | 3:41bdbc9b3cec | 252 | * On Entry: |
pradipv | 3:41bdbc9b3cec | 253 | * @param[in] p_display - pointer to Max7219 object |
pradipv | 3:41bdbc9b3cec | 254 | @param[in] position - for single char print this value is zero, |
pradipv | 3:41bdbc9b3cec | 255 | for string case it is multiple of 32 bytes as each char data is 32 bytes, |
pradipv | 3:41bdbc9b3cec | 256 | * @param[in] c - char to print |
pradipv | 6:00aabe967e51 | 257 | * @param[in] font_type - 16x16 font type used for display |
pradipv | 3:41bdbc9b3cec | 258 | * |
pradipv | 3:41bdbc9b3cec | 259 | * On Exit: |
pradipv | 3:41bdbc9b3cec | 260 | * @return none |
pradipv | 3:41bdbc9b3cec | 261 | **************************************************************/ |
pradipv | 6:00aabe967e51 | 262 | void print_char_16x16(Max7219 *p_display, uint16_t position, char c,uint8_t font_type); |
pradipv | 3:41bdbc9b3cec | 263 | |
pradipv | 3:41bdbc9b3cec | 264 | |
pradipv | 3:41bdbc9b3cec | 265 | /**********************************************************//** |
pradipv | 3:41bdbc9b3cec | 266 | * @brief prints given string to MAXREFDES99 16x16 LED display |
pradipv | 3:41bdbc9b3cec | 267 | * |
pradipv | 3:41bdbc9b3cec | 268 | * @details |
pradipv | 3:41bdbc9b3cec | 269 | * |
pradipv | 3:41bdbc9b3cec | 270 | * On Entry: |
pradipv | 3:41bdbc9b3cec | 271 | * @param[in] p_display - pointer to Max7219 object |
pradipv | 3:41bdbc9b3cec | 272 | * @param[in] s - pointer to string to print |
pradipv | 6:00aabe967e51 | 273 | * @param[in] font_type - 16x16 font type used for display |
pradipv | 3:41bdbc9b3cec | 274 | * |
pradipv | 3:41bdbc9b3cec | 275 | * On Exit: |
pradipv | 3:41bdbc9b3cec | 276 | * @return none |
pradipv | 3:41bdbc9b3cec | 277 | **************************************************************/ |
pradipv | 6:00aabe967e51 | 278 | void print_string_16x16(Max7219 *p_display, char *s, uint8_t font_type); |
pradipv | 3:41bdbc9b3cec | 279 | |
pradipv | 3:41bdbc9b3cec | 280 | |
pradipv | 3:41bdbc9b3cec | 281 | /**********************************************************//** |
pradipv | 6:00aabe967e51 | 282 | * @brief shifts 16x16 font display right 'count' positions with given |
pradipv | 3:41bdbc9b3cec | 283 | * delay between shifts |
pradipv | 3:41bdbc9b3cec | 284 | * |
pradipv | 3:41bdbc9b3cec | 285 | * @details |
pradipv | 3:41bdbc9b3cec | 286 | * |
pradipv | 3:41bdbc9b3cec | 287 | * On Entry: |
pradipv | 3:41bdbc9b3cec | 288 | * @param[in] p_display - pointer to Max7219 object |
pradipv | 3:41bdbc9b3cec | 289 | * @param[in] count - number of positions to shift |
pradipv | 3:41bdbc9b3cec | 290 | * @param[in] delay - delay between shifts in milliseconds |
pradipv | 3:41bdbc9b3cec | 291 | * |
pradipv | 3:41bdbc9b3cec | 292 | * On Exit: |
pradipv | 3:41bdbc9b3cec | 293 | * @return none |
pradipv | 3:41bdbc9b3cec | 294 | **************************************************************/ |
pradipv | 3:41bdbc9b3cec | 295 | void shift_display_right_16x16(Max7219 *p_display, uint8_t count, uint8_t delay); |
pradipv | 3:41bdbc9b3cec | 296 | |
pradipv | 3:41bdbc9b3cec | 297 | |
pradipv | 3:41bdbc9b3cec | 298 | /**********************************************************//** |
pradipv | 6:00aabe967e51 | 299 | * @brief shifts 16x16 font display left 'count' positions with given |
pradipv | 3:41bdbc9b3cec | 300 | * delay between shifts |
pradipv | 3:41bdbc9b3cec | 301 | * |
pradipv | 3:41bdbc9b3cec | 302 | * @details |
pradipv | 3:41bdbc9b3cec | 303 | * |
pradipv | 3:41bdbc9b3cec | 304 | * On Entry: |
pradipv | 3:41bdbc9b3cec | 305 | * @param[in] p_display - pointer to Max7219 object |
pradipv | 3:41bdbc9b3cec | 306 | * @param[in] count - number of positions to shift |
pradipv | 3:41bdbc9b3cec | 307 | * @param[in] delay - delay between shifts in milliseconds |
pradipv | 3:41bdbc9b3cec | 308 | * |
pradipv | 3:41bdbc9b3cec | 309 | * On Exit: |
pradipv | 3:41bdbc9b3cec | 310 | * @return none |
pradipv | 3:41bdbc9b3cec | 311 | **************************************************************/ |
pradipv | 3:41bdbc9b3cec | 312 | void shift_display_left_16x16(Max7219 *p_display, uint8_t count, uint8_t delay); |
pradipv | 3:41bdbc9b3cec | 313 | |
pradipv | 3:41bdbc9b3cec | 314 | /**********************************************************//** |
pradipv | 3:41bdbc9b3cec | 315 | * @brief demo loop for MAXREFDES99 with 16x16 font display |
pradipv | 3:41bdbc9b3cec | 316 | * |
pradipv | 3:41bdbc9b3cec | 317 | * @details |
pradipv | 3:41bdbc9b3cec | 318 | * |
pradipv | 3:41bdbc9b3cec | 319 | * On Entry: |
pradipv | 3:41bdbc9b3cec | 320 | * @param[in] p_display - pointer to Max7219 object |
pradipv | 3:41bdbc9b3cec | 321 | * @param[in] display_config - structure holding configuration data |
pradipv | 6:00aabe967e51 | 322 | * @param[in] font_type - 16x16 font type used for display |
pradipv | 3:41bdbc9b3cec | 323 | * @param[in] endless_loop - if true run demo in endless loop |
pradipv | 3:41bdbc9b3cec | 324 | * |
pradipv | 3:41bdbc9b3cec | 325 | * On Exit: |
pradipv | 3:41bdbc9b3cec | 326 | * @return none |
pradipv | 3:41bdbc9b3cec | 327 | **************************************************************/ |
pradipv | 6:00aabe967e51 | 328 | void demo_16x16(Max7219 *display, max7219_configuration_t display_config,uint8_t font_type, bool endless_loop); |
pradipv | 3:41bdbc9b3cec | 329 | |
pradipv | 3:41bdbc9b3cec | 330 | |
pradipv | 3:41bdbc9b3cec | 331 | /**********************************************************//** |
pradipv | 6:00aabe967e51 | 332 | * @brief shift 16x16 font display in given direction forever |
pradipv | 3:41bdbc9b3cec | 333 | * |
pradipv | 3:41bdbc9b3cec | 334 | * @details |
pradipv | 3:41bdbc9b3cec | 335 | * |
pradipv | 3:41bdbc9b3cec | 336 | * On Entry: |
pradipv | 3:41bdbc9b3cec | 337 | * @param[in] p_display - pointer to Max7219 object |
pradipv | 3:41bdbc9b3cec | 338 | * @param[in] scroll_right - if true shift right, else shift left |
pradipv | 3:41bdbc9b3cec | 339 | * |
pradipv | 3:41bdbc9b3cec | 340 | * On Exit: |
pradipv | 3:41bdbc9b3cec | 341 | * @return none |
pradipv | 3:41bdbc9b3cec | 342 | **************************************************************/ |
pradipv | 3:41bdbc9b3cec | 343 | void endless_scroll_display_16x16(Max7219 *display, uint32_t scroll_right); |
pradipv | 3:41bdbc9b3cec | 344 | |
j3 | 0:6b0161c3e440 | 345 | |
j3 | 1:06c0a61ca171 | 346 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 347 | * @brief print demo menu |
j3 | 1:06c0a61ca171 | 348 | * |
j3 | 1:06c0a61ca171 | 349 | * @details |
j3 | 1:06c0a61ca171 | 350 | * |
j3 | 1:06c0a61ca171 | 351 | * On Entry: |
j3 | 1:06c0a61ca171 | 352 | * |
j3 | 1:06c0a61ca171 | 353 | * On Exit: |
j3 | 1:06c0a61ca171 | 354 | * @return user entry |
j3 | 1:06c0a61ca171 | 355 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 356 | uint32_t print_menu(void); |
j3 | 0:6b0161c3e440 | 357 | |
j3 | 0:6b0161c3e440 | 358 | |
j3 | 1:06c0a61ca171 | 359 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 360 | * @brief get integer value from user |
j3 | 1:06c0a61ca171 | 361 | * |
j3 | 1:06c0a61ca171 | 362 | * @details |
j3 | 1:06c0a61ca171 | 363 | * |
j3 | 1:06c0a61ca171 | 364 | * On Entry: |
j3 | 1:06c0a61ca171 | 365 | * @param[in] msg - prompt for user |
j3 | 1:06c0a61ca171 | 366 | * @param[in] max_val - maximum allowable input |
j3 | 1:06c0a61ca171 | 367 | * |
j3 | 1:06c0a61ca171 | 368 | * On Exit: |
j3 | 1:06c0a61ca171 | 369 | * @return user entry |
j3 | 1:06c0a61ca171 | 370 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 371 | uint32_t get_user_input(char *msg, uint32_t max_val); |
j3 | 0:6b0161c3e440 | 372 | |
j3 | 0:6b0161c3e440 | 373 | |
j3 | 1:06c0a61ca171 | 374 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 375 | * @brief get char from user |
j3 | 1:06c0a61ca171 | 376 | * |
j3 | 1:06c0a61ca171 | 377 | * @details |
j3 | 1:06c0a61ca171 | 378 | * |
j3 | 1:06c0a61ca171 | 379 | * On Entry: |
j3 | 1:06c0a61ca171 | 380 | * @param[in] msg - prompt for user |
j3 | 1:06c0a61ca171 | 381 | * |
j3 | 1:06c0a61ca171 | 382 | * On Exit: |
j3 | 1:06c0a61ca171 | 383 | * @return user entry |
j3 | 1:06c0a61ca171 | 384 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 385 | char get_user_char(char *msg); |
j3 | 0:6b0161c3e440 | 386 | |
j3 | 0:6b0161c3e440 | 387 | |
j3 | 1:06c0a61ca171 | 388 | /**********************************************************//** |
j3 | 1:06c0a61ca171 | 389 | * @brief get string from user |
j3 | 1:06c0a61ca171 | 390 | * |
j3 | 1:06c0a61ca171 | 391 | * @details |
j3 | 1:06c0a61ca171 | 392 | * |
j3 | 1:06c0a61ca171 | 393 | * On Entry: |
j3 | 1:06c0a61ca171 | 394 | * @param[in] msg - prompt for user |
j3 | 1:06c0a61ca171 | 395 | * |
j3 | 1:06c0a61ca171 | 396 | * On Exit: |
j3 | 1:06c0a61ca171 | 397 | * @return user entry |
j3 | 1:06c0a61ca171 | 398 | **************************************************************/ |
j3 | 0:6b0161c3e440 | 399 | char * get_user_string(char *msg); |
j3 | 0:6b0161c3e440 | 400 | |
j3 | 0:6b0161c3e440 | 401 | |
j3 | 0:6b0161c3e440 | 402 | #endif /*MAXREFDES99_H*/ |
j3 | 0:6b0161c3e440 | 403 |