diff --git a/final_project/312_final.code-workspace b/final_project/312_final.code-workspace index c079050..186d677 100644 --- a/final_project/312_final.code-workspace +++ b/final_project/312_final.code-workspace @@ -17,7 +17,8 @@ "periph.h": "c", "comms.h": "c", "string.h": "c", - "main.h": "c" + "main.h": "c", + "sleep.h": "c" } } } \ No newline at end of file diff --git a/final_project/comms/comms.h b/final_project/comms/comms.h index f429440..a3e9bf5 100644 --- a/final_project/comms/comms.h +++ b/final_project/comms/comms.h @@ -4,6 +4,7 @@ #include #include + /** * Our format goes like this: * @@ -24,8 +25,14 @@ typedef enum { /** @brief Inline function to send commands and values. */ inline void comms_send(comms_cmd_t cmd) { + +#if defined(__AVR_ATtiny2313__) while (! (UCSRA & (1 << UDRE))); UDR = cmd; +#elif defined(__AVR_ATmega328P__) + while (! (UCSR0A & (1 << UDRE0))); + UDR0 = cmd; +#endif } /** @brief Selects a file from the list on the DAC side. @@ -45,6 +52,18 @@ inline void comms_query_name(uint8_t id) { comms_send(id); } +/** @brief Repliers with the name of the requsted song ID + */ +inline void comms_reply_name(char* name) { + uint8_t len = strlen(name); + comms_send(COMMS_CMD_REPLY_NAME); + comms_send(len); + + for (uint8_t i = 0; i < len; i++) { + comms_send((uint8_t) name[i]); + } +} + /** @brief Clears the LCD list of files. */ inline void comms_clear() { diff --git a/final_project/sd_reader/.vscode/tasks.json b/final_project/sd_reader/.vscode/tasks.json index 9d26701..794c3b1 100644 --- a/final_project/sd_reader/.vscode/tasks.json +++ b/final_project/sd_reader/.vscode/tasks.json @@ -10,7 +10,10 @@ "group": { "kind": "build", "isDefault": true - } + }, + "problemMatcher": [ + "$gcc" + ] } ] } \ No newline at end of file diff --git a/final_project/sd_reader/comms.h b/final_project/sd_reader/comms.h new file mode 120000 index 0000000..ad5c9e6 --- /dev/null +++ b/final_project/sd_reader/comms.h @@ -0,0 +1 @@ +../comms/comms.h \ No newline at end of file diff --git a/final_project/sd_reader/doc/html/annotated.html b/final_project/sd_reader/doc/html/annotated.html deleted file mode 100644 index a206933..0000000 --- a/final_project/sd_reader/doc/html/annotated.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - -sd-reader: Data Structures - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
-
-
Data Structures
-
-
-
Here are the data structures with brief descriptions:
- - - -
fat_dir_entry_structDescribes a directory entry
partition_structDescribes a partition
sd_raw_infoThis struct is used by sd_raw_get_info() to return manufacturing and status information of the card
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/bc_s.png b/final_project/sd_reader/doc/html/bc_s.png deleted file mode 100644 index e401862..0000000 Binary files a/final_project/sd_reader/doc/html/bc_s.png and /dev/null differ diff --git a/final_project/sd_reader/doc/html/byteordering_8c.html b/final_project/sd_reader/doc/html/byteordering_8c.html deleted file mode 100644 index bf7c818..0000000 --- a/final_project/sd_reader/doc/html/byteordering_8c.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - -sd-reader: byteordering.c File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
byteordering.c File Reference
-
-
- -

Byte-order handling implementation (license: GPLv2 or LGPLv2.1) -More...

- - - - - - - - - - -

-Functions

uint16_t read16 (const uint8_t *p)
 Reads a 16-bit integer from memory in little-endian byte order.
uint32_t read32 (const uint8_t *p)
 Reads a 32-bit integer from memory in little-endian byte order.
void write16 (uint8_t *p, uint16_t i)
 Writes a 16-bit integer into memory in little-endian byte order.
void write32 (uint8_t *p, uint32_t i)
 Writes a 32-bit integer into memory in little-endian byte order.
-

Detailed Description

-

Byte-order handling implementation (license: GPLv2 or LGPLv2.1)

-
Author:
Roland Riegel
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/byteordering_8h.html b/final_project/sd_reader/doc/html/byteordering_8h.html deleted file mode 100644 index 2947b21..0000000 --- a/final_project/sd_reader/doc/html/byteordering_8h.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - -sd-reader: byteordering.h File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
byteordering.h File Reference
-
-
- -

Byte-order handling header (license: GPLv2 or LGPLv2.1) -More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Defines

#define HTOL16(val)
 Converts a 16-bit integer from host byte order to little-endian byte order.
#define HTOL32(val)
 Converts a 32-bit integer from host byte order to little-endian byte order.
#define LTOH16(val)
 Converts a 16-bit integer from little-endian byte order to host byte order.
#define LTOH32(val)
 Converts a 32-bit integer from little-endian byte order to host byte order.

-Functions

uint16_t htol16 (uint16_t h)
 Converts a 16-bit integer from host byte order to little-endian byte order.
uint32_t htol32 (uint32_t h)
 Converts a 32-bit integer from host byte order to little-endian byte order.
uint16_t ltoh16 (uint16_t l)
 Converts a 16-bit integer from little-endian byte order to host byte order.
uint32_t ltoh32 (uint32_t l)
 Converts a 32-bit integer from little-endian byte order to host byte order.
uint16_t read16 (const uint8_t *p)
 Reads a 16-bit integer from memory in little-endian byte order.
uint32_t read32 (const uint8_t *p)
 Reads a 32-bit integer from memory in little-endian byte order.
void write16 (uint8_t *p, uint16_t i)
 Writes a 16-bit integer into memory in little-endian byte order.
void write32 (uint8_t *p, uint32_t i)
 Writes a 32-bit integer into memory in little-endian byte order.
-

Detailed Description

-

Byte-order handling header (license: GPLv2 or LGPLv2.1)

-
Author:
Roland Riegel
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/classes.html b/final_project/sd_reader/doc/html/classes.html deleted file mode 100644 index 1e0b536..0000000 --- a/final_project/sd_reader/doc/html/classes.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - - -sd-reader: Data Structure Index - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
-
-
Data Structure Index
-
-
-
F | P | S
- - - - - -
  F  
-
  P  
-
  S  
-
fat_dir_entry_struct   partition_struct   sd_raw_info   
-
F | P | S
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/closed.png b/final_project/sd_reader/doc/html/closed.png deleted file mode 100644 index b7d4bd9..0000000 Binary files a/final_project/sd_reader/doc/html/closed.png and /dev/null differ diff --git a/final_project/sd_reader/doc/html/doxygen.css b/final_project/sd_reader/doc/html/doxygen.css deleted file mode 100644 index cee0d06..0000000 --- a/final_project/sd_reader/doc/html/doxygen.css +++ /dev/null @@ -1,949 +0,0 @@ -/* The standard CSS for doxygen */ - -body, table, div, p, dl { - font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; - font-size: 13px; - line-height: 1.3; -} - -/* @group Heading Levels */ - -h1 { - font-size: 150%; -} - -.title { - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h2 { - font-size: 120%; -} - -h3 { - font-size: 100%; -} - -dt { - font-weight: bold; -} - -div.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; -} - -p.startli, p.startdd, p.starttd { - margin-top: 2px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; -} - -div.qindex, div.navpath { - width: 100%; - line-height: 140%; -} - -div.navtab { - margin-right: 15px; -} - -/* @group Link Styling */ - -a { - color: #3D578C; - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: #4665A2; -} - -a:hover { - text-decoration: underline; -} - -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #ffffff; - border: 1px double #869DCA; -} - -.contents a.qindexHL:visited { - color: #ffffff; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code, a.code:visited { - color: #4665A2; -} - -a.codeRef, a.codeRef:visited { - color: #4665A2; -} - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -.fragment { - font-family: monospace, fixed; - font-size: 105%; -} - -pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; -} - -div.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px; - padding: 0.2em; - border: solid thin #333; - border-radius: 0.5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - box-shadow: 2px 2px 3px #999; - -webkit-box-shadow: 2px 2px 3px #999; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - background-color: white; - color: black; - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 8px; - margin-right: 8px; -} - -td.indexkey { - background-color: #EBEFF6; - font-weight: bold; - border: 1px solid #C4CFE5; - margin: 2px 0px 2px 0; - padding: 2px 10px; - white-space: nowrap; - vertical-align: top; -} - -td.indexvalue { - background-color: #EBEFF6; - border: 1px solid #C4CFE5; - padding: 2px 10px; - margin: 2px 0px; -} - -tr.memlist { - background-color: #EEF1F7; -} - -p.formulaDsp { - text-align: center; -} - -img.formulaDsp { - -} - -img.formulaInl { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; -} - -/* @group Code Colorization */ - -span.keyword { - color: #008000 -} - -span.keywordtype { - color: #604020 -} - -span.keywordflow { - color: #e08000 -} - -span.comment { - color: #800000 -} - -span.preprocessor { - color: #806020 -} - -span.stringliteral { - color: #002080 -} - -span.charliteral { - color: #008080 -} - -span.vhdldigit { - color: #ff00ff -} - -span.vhdlchar { - color: #000000 -} - -span.vhdlkeyword { - color: #700070 -} - -span.vhdllogic { - color: #ff0000 -} - -/* @end */ - -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #A3B4D7; -} - -th.dirtab { - background: #EBEFF6; - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid #4A6AAA; -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memItemLeft, .memItemRight, .memTemplParams { - border-top: 1px solid #C4CFE5; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight { - width: 100%; -} - -.memTemplParams { - color: #4665A2; - white-space: nowrap; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtemplate { - font-size: 80%; - color: #4665A2; - font-weight: normal; - margin-left: 9px; -} - -.memnav { - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; -} - -.memname { - white-space: nowrap; - font-weight: bold; - margin-left: 6px; -} - -.memproto, dl.reflist dt { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 0px 6px 0px; - color: #253555; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - /* opera specific markup */ - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 8px; - border-top-left-radius: 8px; - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 8px; - -moz-border-radius-topleft: 8px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 8px; - -webkit-border-top-left-radius: 8px; - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - -} - -.memdoc, dl.reflist dd { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 2px 5px; - background-color: #FBFCFD; - border-top-width: 0; - /* opera specific markup */ - border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); -} - -dl.reflist dt { - padding: 5px; -} - -dl.reflist dd { - margin: 0px 0px 10px 0px; - padding: 5px; -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} - -.params, .retval, .exception, .tparams { - border-spacing: 6px 2px; -} - -.params .paramname, .retval .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir { - font-family: "courier new",courier,monospace; - vertical-align: top; -} - - - - -/* @end */ - -/* @group Directory (tree) */ - -/* for the tree view */ - -.ftvtree { - font-family: sans-serif; - margin: 0px; -} - -/* these are for tree view when used as main index */ - -.directory { - font-size: 9pt; - font-weight: bold; - margin: 5px; -} - -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* -The following two styles can be used to replace the root node title -with an image of your choice. Simply uncomment the next two styles, -specify the name of your image and be sure to set 'height' to the -proper pixel height of your image. -*/ - -/* -.directory h3.swap { - height: 61px; - background-repeat: no-repeat; - background-image: url("yourimage.gif"); -} -.directory h3.swap span { - display: none; -} -*/ - -.directory > h3 { - margin-top: 0; -} - -.directory p { - margin: 0px; - white-space: nowrap; -} - -.directory div { - display: none; - margin: 0px; -} - -.directory img { - vertical-align: -30%; -} - -/* these are for tree view when not used as main index */ - -.directory-alt { - font-size: 100%; - font-weight: bold; -} - -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -.directory-alt > h3 { - margin-top: 0; -} - -.directory-alt p { - margin: 0px; - white-space: nowrap; -} - -.directory-alt div { - display: none; - margin: 0px; -} - -.directory-alt img { - vertical-align: -30%; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; -} - -address { - font-style: normal; - color: #2A3D61; -} - -table.doxtable { - border-collapse:collapse; -} - -table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; -} - -table.fieldtable { - width: 100%; - margin-bottom: 10px; - border: 1px solid #A8B8D9; - border-spacing: 0px; - -moz-border-radius: 4px; - -webkit-border-radius: 4px; - border-radius: 4px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); - box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); -} - -.fieldtable td, .fieldtable th { - padding: 3px 7px 2px; -} - -.fieldtable td.fieldtype, .fieldtable td.fieldname { - white-space: nowrap; - border-right: 1px solid #A8B8D9; - border-bottom: 1px solid #A8B8D9; - vertical-align: top; -} - -.fieldtable td.fielddoc { - border-bottom: 1px solid #A8B8D9; - width: 100%; -} - -.fieldtable tr:last-child td { - border-bottom: none; -} - -.fieldtable th { - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - font-size: 90%; - color: #253555; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom: 1px solid #A8B8D9; -} - - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - height:30px; - line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:url('bc_s.png'); - background-repeat:no-repeat; - background-position:right; - color:#364D7C; -} - -.navpath li.navelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; -} - -.navpath li.navelem a:hover -{ - color:#6884BD; -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color:#364D7C; - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -div.ingroups -{ - margin-left: 5px; - font-size: 8pt; - padding-left: 5px; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; - margin: 0px; - border-bottom: 1px solid #C4CFE5; -} - -div.headertitle -{ - padding: 5px 5px 5px 7px; -} - -dl -{ - padding: 0 0 0 10px; -} - -dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug -{ - border-left:4px solid; - padding: 0 0 0 6px; -} - -dl.note -{ - border-color: #D0C000; -} - -dl.warning, dl.attention -{ - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant -{ - border-color: #00D000; -} - -dl.deprecated -{ - border-color: #505050; -} - -dl.todo -{ - border-color: #00C0E0; -} - -dl.test -{ - border-color: #3030E0; -} - -dl.bug -{ - border-color: #C08050; -} - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectname -{ - font: 300% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font: 50% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid #5373B4; -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - -div.zoom -{ - border: 1px solid #90A5CE; -} - -dl.citelist { - margin-bottom:50px; -} - -dl.citelist dt { - color:#334975; - float:left; - font-weight:bold; - margin-right:10px; - padding:5px; -} - -dl.citelist dd { - margin:2px 0; - padding:5px 0; -} - -@media print -{ - #top { display: none; } - #side-nav { display: none; } - #nav-path { display: none; } - body { overflow:visible; } - h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } - .summary { display: none; } - .memitem { page-break-inside: avoid; } - #doc-content - { - margin-left:0 !important; - height:auto !important; - width:auto !important; - overflow:inherit; - display:inline; - } - pre.fragment - { - overflow: visible; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; /* Moz */ - white-space: -pre-wrap; /* Opera 4-6 */ - white-space: -o-pre-wrap; /* Opera 7 */ - white-space: pre-wrap; /* CSS3 */ - word-wrap: break-word; /* IE 5.5+ */ - } -} - diff --git a/final_project/sd_reader/doc/html/doxygen.png b/final_project/sd_reader/doc/html/doxygen.png deleted file mode 100644 index 635ed52..0000000 Binary files a/final_project/sd_reader/doc/html/doxygen.png and /dev/null differ diff --git a/final_project/sd_reader/doc/html/fat_8c.html b/final_project/sd_reader/doc/html/fat_8c.html deleted file mode 100644 index 5e49587..0000000 --- a/final_project/sd_reader/doc/html/fat_8c.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - -sd-reader: fat.c File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
fat.c File Reference
-
-
- -

FAT implementation (license: GPLv2 or LGPLv2.1) -More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Functions

struct fat_fs_struct * fat_open (struct partition_struct *partition)
 Opens a FAT filesystem.
void fat_close (struct fat_fs_struct *fs)
 Closes a FAT filesystem.
uint8_t fat_get_dir_entry_of_path (struct fat_fs_struct *fs, const char *path, struct fat_dir_entry_struct *dir_entry)
 Retrieves the directory entry of a path.
struct fat_file_struct * fat_open_file (struct fat_fs_struct *fs, const struct fat_dir_entry_struct *dir_entry)
 Opens a file on a FAT filesystem.
void fat_close_file (struct fat_file_struct *fd)
 Closes a file.
intptr_t fat_read_file (struct fat_file_struct *fd, uint8_t *buffer, uintptr_t buffer_len)
 Reads data from a file.
intptr_t fat_write_file (struct fat_file_struct *fd, const uint8_t *buffer, uintptr_t buffer_len)
 Writes data to a file.
uint8_t fat_seek_file (struct fat_file_struct *fd, int32_t *offset, uint8_t whence)
 Repositions the read/write file offset.
uint8_t fat_resize_file (struct fat_file_struct *fd, uint32_t size)
 Resizes a file to have a specific size.
struct fat_dir_struct * fat_open_dir (struct fat_fs_struct *fs, const struct fat_dir_entry_struct *dir_entry)
 Opens a directory.
void fat_close_dir (struct fat_dir_struct *dd)
 Closes a directory descriptor.
uint8_t fat_read_dir (struct fat_dir_struct *dd, struct fat_dir_entry_struct *dir_entry)
 Reads the next directory entry contained within a parent directory.
uint8_t fat_reset_dir (struct fat_dir_struct *dd)
 Resets a directory handle.
uint8_t fat_create_file (struct fat_dir_struct *parent, const char *file, struct fat_dir_entry_struct *dir_entry)
 Creates a file.
uint8_t fat_delete_file (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry)
 Deletes a file or directory.
uint8_t fat_move_file (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry, struct fat_dir_struct *parent_new, const char *file_new)
 Moves or renames a file.
uint8_t fat_create_dir (struct fat_dir_struct *parent, const char *dir, struct fat_dir_entry_struct *dir_entry)
 Creates a directory.
uint8_t fat_delete_dir (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry)
 Deletes a directory.
uint8_t fat_move_dir (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry, struct fat_dir_struct *parent_new, const char *dir_new)
 Moves or renames a directory.
void fat_get_file_modification_date (const struct fat_dir_entry_struct *dir_entry, uint16_t *year, uint8_t *month, uint8_t *day)
 Returns the modification date of a file.
void fat_get_file_modification_time (const struct fat_dir_entry_struct *dir_entry, uint8_t *hour, uint8_t *min, uint8_t *sec)
 Returns the modification time of a file.
void fat_set_file_modification_date (struct fat_dir_entry_struct *dir_entry, uint16_t year, uint8_t month, uint8_t day)
 Sets the modification time of a date.
void fat_set_file_modification_time (struct fat_dir_entry_struct *dir_entry, uint8_t hour, uint8_t min, uint8_t sec)
 Sets the modification time of a file.
offset_t fat_get_fs_size (const struct fat_fs_struct *fs)
 Returns the amount of total storage capacity of the filesystem in bytes.
offset_t fat_get_fs_free (const struct fat_fs_struct *fs)
 Returns the amount of free storage capacity on the filesystem in bytes.
-uint8_t fat_get_fs_free_32_callback (uint8_t *buffer, offset_t offset, void *p)
 Callback function used for counting free clusters in a FAT32.
-

Detailed Description

-

FAT implementation (license: GPLv2 or LGPLv2.1)

-
Author:
Roland Riegel
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/fat_8h.html b/final_project/sd_reader/doc/html/fat_8h.html deleted file mode 100644 index 445811a..0000000 --- a/final_project/sd_reader/doc/html/fat_8h.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - -sd-reader: fat.h File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
fat.h File Reference
-
-
- -

FAT header (license: GPLv2 or LGPLv2.1) -More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Structures

struct  fat_dir_entry_struct
 Describes a directory entry. More...

-Defines

#define FAT_ATTRIB_READONLY
 The file is read-only.
#define FAT_ATTRIB_HIDDEN
 The file is hidden.
#define FAT_ATTRIB_SYSTEM
 The file is a system file.
#define FAT_ATTRIB_VOLUME
 The file is empty and has the volume label as its name.
#define FAT_ATTRIB_DIR
 The file is a directory.
#define FAT_ATTRIB_ARCHIVE
 The file has to be archived.
#define FAT_SEEK_SET
 The given offset is relative to the beginning of the file.
#define FAT_SEEK_CUR
 The given offset is relative to the current read/write position.
#define FAT_SEEK_END
 The given offset is relative to the end of the file.

-Functions

struct fat_fs_struct * fat_open (struct partition_struct *partition)
 Opens a FAT filesystem.
void fat_close (struct fat_fs_struct *fs)
 Closes a FAT filesystem.
struct fat_file_struct * fat_open_file (struct fat_fs_struct *fs, const struct fat_dir_entry_struct *dir_entry)
 Opens a file on a FAT filesystem.
void fat_close_file (struct fat_file_struct *fd)
 Closes a file.
intptr_t fat_read_file (struct fat_file_struct *fd, uint8_t *buffer, uintptr_t buffer_len)
 Reads data from a file.
intptr_t fat_write_file (struct fat_file_struct *fd, const uint8_t *buffer, uintptr_t buffer_len)
 Writes data to a file.
uint8_t fat_seek_file (struct fat_file_struct *fd, int32_t *offset, uint8_t whence)
 Repositions the read/write file offset.
uint8_t fat_resize_file (struct fat_file_struct *fd, uint32_t size)
 Resizes a file to have a specific size.
struct fat_dir_struct * fat_open_dir (struct fat_fs_struct *fs, const struct fat_dir_entry_struct *dir_entry)
 Opens a directory.
void fat_close_dir (struct fat_dir_struct *dd)
 Closes a directory descriptor.
uint8_t fat_read_dir (struct fat_dir_struct *dd, struct fat_dir_entry_struct *dir_entry)
 Reads the next directory entry contained within a parent directory.
uint8_t fat_reset_dir (struct fat_dir_struct *dd)
 Resets a directory handle.
uint8_t fat_create_file (struct fat_dir_struct *parent, const char *file, struct fat_dir_entry_struct *dir_entry)
 Creates a file.
uint8_t fat_delete_file (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry)
 Deletes a file or directory.
uint8_t fat_move_file (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry, struct fat_dir_struct *parent_new, const char *file_new)
 Moves or renames a file.
uint8_t fat_create_dir (struct fat_dir_struct *parent, const char *dir, struct fat_dir_entry_struct *dir_entry)
 Creates a directory.
void fat_get_file_modification_date (const struct fat_dir_entry_struct *dir_entry, uint16_t *year, uint8_t *month, uint8_t *day)
 Returns the modification date of a file.
void fat_get_file_modification_time (const struct fat_dir_entry_struct *dir_entry, uint8_t *hour, uint8_t *min, uint8_t *sec)
 Returns the modification time of a file.
uint8_t fat_get_dir_entry_of_path (struct fat_fs_struct *fs, const char *path, struct fat_dir_entry_struct *dir_entry)
 Retrieves the directory entry of a path.
offset_t fat_get_fs_size (const struct fat_fs_struct *fs)
 Returns the amount of total storage capacity of the filesystem in bytes.
offset_t fat_get_fs_free (const struct fat_fs_struct *fs)
 Returns the amount of free storage capacity on the filesystem in bytes.
-

Detailed Description

-

FAT header (license: GPLv2 or LGPLv2.1)

-
Author:
Roland Riegel
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/fat__config_8h.html b/final_project/sd_reader/doc/html/fat__config_8h.html deleted file mode 100644 index 39c7538..0000000 --- a/final_project/sd_reader/doc/html/fat__config_8h.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - -sd-reader: fat_config.h File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
fat_config.h File Reference
-
-
- -

FAT configuration (license: GPLv2 or LGPLv2.1) -More...

- - - - - - - - - - - - - - - - - - - - -

-Defines

#define FAT_WRITE_SUPPORT
 Controls FAT write support.
#define FAT_LFN_SUPPORT
 Controls FAT long filename (LFN) support.
#define FAT_DATETIME_SUPPORT
 Controls FAT date and time support.
#define FAT_FAT32_SUPPORT
 Controls FAT32 support.
#define FAT_DELAY_DIRENTRY_UPDATE
 Controls updates of directory entries.
#define fat_get_datetime(year, month, day, hour, min, sec)
 Determines the function used for retrieving current date and time.
-#define FAT_FS_COUNT
 Maximum number of filesystem handles.
-#define FAT_FILE_COUNT
 Maximum number of file handles.
-#define FAT_DIR_COUNT
 Maximum number of directory handles.
-

Detailed Description

-

FAT configuration (license: GPLv2 or LGPLv2.1)

-
- - - - - - diff --git a/final_project/sd_reader/doc/html/files.html b/final_project/sd_reader/doc/html/files.html deleted file mode 100644 index d05a5a5..0000000 --- a/final_project/sd_reader/doc/html/files.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - -sd-reader: File List - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
-
-
File List
-
-
-
Here is a list of all documented files with brief descriptions:
- - - - - - - - - - - - -
byteordering.cByte-order handling implementation (license: GPLv2 or LGPLv2.1)
byteordering.hByte-order handling header (license: GPLv2 or LGPLv2.1)
fat.cFAT implementation (license: GPLv2 or LGPLv2.1)
fat.hFAT header (license: GPLv2 or LGPLv2.1)
fat_config.hFAT configuration (license: GPLv2 or LGPLv2.1)
partition.cPartition table implementation (license: GPLv2 or LGPLv2.1)
partition.hPartition table header (license: GPLv2 or LGPLv2.1)
partition_config.hPartition configuration (license: GPLv2 or LGPLv2.1)
sd-reader_config.hCommon sd-reader configuration used by all modules (license: GPLv2 or LGPLv2.1)
sd_raw.cMMC/SD/SDHC raw access implementation (license: GPLv2 or LGPLv2.1)
sd_raw.hMMC/SD/SDHC raw access header (license: GPLv2 or LGPLv2.1)
sd_raw_config.hMMC/SD support configuration (license: GPLv2 or LGPLv2.1)
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/functions.html b/final_project/sd_reader/doc/html/functions.html deleted file mode 100644 index cb0cda3..0000000 --- a/final_project/sd_reader/doc/html/functions.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - -sd-reader: Data Fields - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - - -
-
-
Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/functions_vars.html b/final_project/sd_reader/doc/html/functions_vars.html deleted file mode 100644 index 6faa081..0000000 --- a/final_project/sd_reader/doc/html/functions_vars.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - -sd-reader: Data Fields - Variables - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - - -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/globals.html b/final_project/sd_reader/doc/html/globals.html deleted file mode 100644 index b36dc61..0000000 --- a/final_project/sd_reader/doc/html/globals.html +++ /dev/null @@ -1,422 +0,0 @@ - - - - - -sd-reader: Globals - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - - - -
-
-
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
- -

- d -

- - -

- f -

- - -

- h -

- - -

- l -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- u -

- - -

- w -

-
- - - - - - diff --git a/final_project/sd_reader/doc/html/globals_defs.html b/final_project/sd_reader/doc/html/globals_defs.html deleted file mode 100644 index 814d6f1..0000000 --- a/final_project/sd_reader/doc/html/globals_defs.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - -sd-reader: Globals - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - - - -
-
-  - -

- f -

- - -

- h -

- - -

- l -

- - -

- p -

- - -

- s -

- - -

- u -

-
- - - - - - diff --git a/final_project/sd_reader/doc/html/globals_func.html b/final_project/sd_reader/doc/html/globals_func.html deleted file mode 100644 index 377e6bb..0000000 --- a/final_project/sd_reader/doc/html/globals_func.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - -sd-reader: Globals - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - - - -
-
-  - -

- f -

- - -

- h -

- - -

- l -

- - -

- p -

- - -

- r -

- - -

- s -

- - -

- w -

-
- - - - - - diff --git a/final_project/sd_reader/doc/html/globals_type.html b/final_project/sd_reader/doc/html/globals_type.html deleted file mode 100644 index 17e51f7..0000000 --- a/final_project/sd_reader/doc/html/globals_type.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - -sd-reader: Globals - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - - -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/group__byteordering.html b/final_project/sd_reader/doc/html/group__byteordering.html deleted file mode 100644 index 9ece1a4..0000000 --- a/final_project/sd_reader/doc/html/group__byteordering.html +++ /dev/null @@ -1,452 +0,0 @@ - - - - - -sd-reader: Byteordering - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
- -
-
Byteordering
-
-
- -

Architecture-dependent handling of byte-ordering. -More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Files

file  byteordering.c
 

Byte-order handling implementation (license: GPLv2 or LGPLv2.1)

-
file  byteordering.h
 

Byte-order handling header (license: GPLv2 or LGPLv2.1)

-

-Defines

#define HTOL16(val)
 Converts a 16-bit integer from host byte order to little-endian byte order.
#define HTOL32(val)
 Converts a 32-bit integer from host byte order to little-endian byte order.
#define LTOH16(val)
 Converts a 16-bit integer from little-endian byte order to host byte order.
#define LTOH32(val)
 Converts a 32-bit integer from little-endian byte order to host byte order.

-Functions

uint16_t read16 (const uint8_t *p)
 Reads a 16-bit integer from memory in little-endian byte order.
uint32_t read32 (const uint8_t *p)
 Reads a 32-bit integer from memory in little-endian byte order.
void write16 (uint8_t *p, uint16_t i)
 Writes a 16-bit integer into memory in little-endian byte order.
void write32 (uint8_t *p, uint32_t i)
 Writes a 32-bit integer into memory in little-endian byte order.
uint16_t htol16 (uint16_t h)
 Converts a 16-bit integer from host byte order to little-endian byte order.
uint32_t htol32 (uint32_t h)
 Converts a 32-bit integer from host byte order to little-endian byte order.
uint16_t ltoh16 (uint16_t l)
 Converts a 16-bit integer from little-endian byte order to host byte order.
uint32_t ltoh32 (uint32_t l)
 Converts a 32-bit integer from little-endian byte order to host byte order.
-

Detailed Description

-

Architecture-dependent handling of byte-ordering.

-

Define Documentation

- -
-
- - - - - - - - -
#define HTOL16( val)
-
-
- -

Converts a 16-bit integer from host byte order to little-endian byte order.

-

Use this macro for compile time constants only. For variable values use the function htol16() instead. This saves code size.

-
Parameters:
- - -
[in]valA 16-bit integer in host byte order.
-
-
-
Returns:
The given 16-bit integer converted to little-endian byte order.
- -
-
- -
-
- - - - - - - - -
#define HTOL32( val)
-
-
- -

Converts a 32-bit integer from host byte order to little-endian byte order.

-

Use this macro for compile time constants only. For variable values use the function htol32() instead. This saves code size.

-
Parameters:
- - -
[in]valA 32-bit integer in host byte order.
-
-
-
Returns:
The given 32-bit integer converted to little-endian byte order.
- -
-
- -
-
- - - - - - - - -
#define LTOH16( val)
-
-
- -

Converts a 16-bit integer from little-endian byte order to host byte order.

-

Use this macro for compile time constants only. For variable values use the function ltoh16() instead. This saves code size.

-
Parameters:
- - -
[in]valA 16-bit integer in little-endian byte order.
-
-
-
Returns:
The given 16-bit integer converted to host byte order.
- -
-
- -
-
- - - - - - - - -
#define LTOH32( val)
-
-
- -

Converts a 32-bit integer from little-endian byte order to host byte order.

-

Use this macro for compile time constants only. For variable values use the function ltoh32() instead. This saves code size.

-
Parameters:
- - -
[in]valA 32-bit integer in little-endian byte order.
-
-
-
Returns:
The given 32-bit integer converted to host byte order.
- -
-
-

Function Documentation

- -
-
- - - - - - - - -
uint16_t htol16 (uint16_t h)
-
-
- -

Converts a 16-bit integer from host byte order to little-endian byte order.

-

Use this function on variable values instead of the macro HTOL16(). This saves code size.

-
Parameters:
- - -
[in]hA 16-bit integer in host byte order.
-
-
-
Returns:
The given 16-bit integer converted to little-endian byte order.
- -
-
- -
-
- - - - - - - - -
uint32_t htol32 (uint32_t h)
-
-
- -

Converts a 32-bit integer from host byte order to little-endian byte order.

-

Use this function on variable values instead of the macro HTOL32(). This saves code size.

-
Parameters:
- - -
[in]hA 32-bit integer in host byte order.
-
-
-
Returns:
The given 32-bit integer converted to little-endian byte order.
- -
-
- -
-
- - - - - - - - -
uint16_t ltoh16 (uint16_t l)
-
-
- -

Converts a 16-bit integer from little-endian byte order to host byte order.

-

Use this function on variable values instead of the macro LTOH16(). This saves code size.

-
Parameters:
- - -
[in]lA 16-bit integer in little-endian byte order.
-
-
-
Returns:
The given 16-bit integer converted to host byte order.
- -
-
- -
-
- - - - - - - - -
uint32_t ltoh32 (uint32_t l)
-
-
- -

Converts a 32-bit integer from little-endian byte order to host byte order.

-

Use this function on variable values instead of the macro LTOH32(). This saves code size.

-
Parameters:
- - -
[in]lA 32-bit integer in little-endian byte order.
-
-
-
Returns:
The given 32-bit integer converted to host byte order.
- -
-
- -
-
- - - - - - - - -
uint16_t read16 (const uint8_t * p)
-
-
- -

Reads a 16-bit integer from memory in little-endian byte order.

-
Parameters:
- - -
[in]pPointer from where to read the integer.
-
-
-
Returns:
The 16-bit integer read from memory.
- -
-
- -
-
- - - - - - - - -
uint32_t read32 (const uint8_t * p)
-
-
- -

Reads a 32-bit integer from memory in little-endian byte order.

-
Parameters:
- - -
[in]pPointer from where to read the integer.
-
-
-
Returns:
The 32-bit integer read from memory.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void write16 (uint8_t * p,
uint16_t i 
)
-
-
- -

Writes a 16-bit integer into memory in little-endian byte order.

-
Parameters:
- - - -
[in]pPointer where to write the integer to.
[in]iThe 16-bit integer to write.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
void write32 (uint8_t * p,
uint32_t i 
)
-
-
- -

Writes a 32-bit integer into memory in little-endian byte order.

-
Parameters:
- - - -
[in]pPointer where to write the integer to.
[in]iThe 32-bit integer to write.
-
-
- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/group__config.html b/final_project/sd_reader/doc/html/group__config.html deleted file mode 100644 index 154600d..0000000 --- a/final_project/sd_reader/doc/html/group__config.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - -sd-reader: Sd-reader configuration - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
- -
-
Sd-reader configuration
-
-
- - - - - - - -

-Files

file  sd-reader_config.h
 

Common sd-reader configuration used by all modules (license: GPLv2 or LGPLv2.1)

-

-Defines

#define USE_DYNAMIC_MEMORY
 Controls allocation of memory.
-

Define Documentation

- -
-
- - - - -
#define USE_DYNAMIC_MEMORY
-
-
- -

Controls allocation of memory.

-

Set to 1 to use malloc()/free() for allocation of structures like file and directory handles, set to 0 to use pre-allocated fixed-size handle arrays.

- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/group__fat.html b/final_project/sd_reader/doc/html/group__fat.html deleted file mode 100644 index 6edbc42..0000000 --- a/final_project/sd_reader/doc/html/group__fat.html +++ /dev/null @@ -1,989 +0,0 @@ - - - - - -sd-reader: FAT support - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
- -
-
FAT support
-
-
- -

This module implements FAT16/FAT32 read and write access. -More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Structures

struct  fat_dir_entry_struct
 Describes a directory entry. More...

-Modules

 FAT configuration
 

Preprocessor defines to configure the FAT implementation.

-
 FAT access
 

Basic functions for handling a FAT filesystem.

-
 FAT file functions
 

Functions for managing files.

-
 FAT directory functions
 

Functions for managing directories.

-

-Files

file  fat.c
 

FAT implementation (license: GPLv2 or LGPLv2.1)

-
file  fat.h
 

FAT header (license: GPLv2 or LGPLv2.1)

-
file  fat_config.h
 

FAT configuration (license: GPLv2 or LGPLv2.1)

-

-Functions

struct fat_fs_struct * fat_open (struct partition_struct *partition)
 Opens a FAT filesystem.
void fat_close (struct fat_fs_struct *fs)
 Closes a FAT filesystem.
struct fat_file_struct * fat_open_file (struct fat_fs_struct *fs, const struct fat_dir_entry_struct *dir_entry)
 Opens a file on a FAT filesystem.
void fat_close_file (struct fat_file_struct *fd)
 Closes a file.
intptr_t fat_read_file (struct fat_file_struct *fd, uint8_t *buffer, uintptr_t buffer_len)
 Reads data from a file.
intptr_t fat_write_file (struct fat_file_struct *fd, const uint8_t *buffer, uintptr_t buffer_len)
 Writes data to a file.
uint8_t fat_seek_file (struct fat_file_struct *fd, int32_t *offset, uint8_t whence)
 Repositions the read/write file offset.
uint8_t fat_resize_file (struct fat_file_struct *fd, uint32_t size)
 Resizes a file to have a specific size.
struct fat_dir_struct * fat_open_dir (struct fat_fs_struct *fs, const struct fat_dir_entry_struct *dir_entry)
 Opens a directory.
void fat_close_dir (struct fat_dir_struct *dd)
 Closes a directory descriptor.
uint8_t fat_read_dir (struct fat_dir_struct *dd, struct fat_dir_entry_struct *dir_entry)
 Reads the next directory entry contained within a parent directory.
uint8_t fat_reset_dir (struct fat_dir_struct *dd)
 Resets a directory handle.
uint8_t fat_create_file (struct fat_dir_struct *parent, const char *file, struct fat_dir_entry_struct *dir_entry)
 Creates a file.
uint8_t fat_delete_file (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry)
 Deletes a file or directory.
uint8_t fat_move_file (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry, struct fat_dir_struct *parent_new, const char *file_new)
 Moves or renames a file.
uint8_t fat_create_dir (struct fat_dir_struct *parent, const char *dir, struct fat_dir_entry_struct *dir_entry)
 Creates a directory.
void fat_get_file_modification_date (const struct fat_dir_entry_struct *dir_entry, uint16_t *year, uint8_t *month, uint8_t *day)
 Returns the modification date of a file.
void fat_get_file_modification_time (const struct fat_dir_entry_struct *dir_entry, uint8_t *hour, uint8_t *min, uint8_t *sec)
 Returns the modification time of a file.
uint8_t fat_get_dir_entry_of_path (struct fat_fs_struct *fs, const char *path, struct fat_dir_entry_struct *dir_entry)
 Retrieves the directory entry of a path.
offset_t fat_get_fs_size (const struct fat_fs_struct *fs)
 Returns the amount of total storage capacity of the filesystem in bytes.
offset_t fat_get_fs_free (const struct fat_fs_struct *fs)
 Returns the amount of free storage capacity on the filesystem in bytes.
-

Detailed Description

-

This module implements FAT16/FAT32 read and write access.

-

The following features are supported:

-
    -
  • File names up to 31 characters long.
  • -
  • Unlimited depth of subdirectories.
  • -
  • Short 8.3 and long filenames.
  • -
  • Creating and deleting files.
  • -
  • Reading and writing from and to files.
  • -
  • File resizing.
  • -
  • File sizes of up to 4 gigabytes.
  • -
-

Function Documentation

- -
-
- - - - - - - - -
void fat_close (struct fat_fs_struct * fs)
-
-
- -

Closes a FAT filesystem.

-

When this function returns, the given filesystem descriptor will be invalid.

-
Parameters:
- - -
[in]fsThe filesystem to close.
-
-
-
See also:
fat_open
- -
-
- -
-
- - - - - - - - -
void fat_close_dir (struct fat_dir_struct * dd)
-
-
- -

Closes a directory descriptor.

-

This function destroys a directory descriptor which was previously obtained by calling fat_open_dir(). When this function returns, the given descriptor will be invalid.

-
Parameters:
- - -
[in]ddThe directory descriptor to close.
-
-
-
See also:
fat_open_dir
- -
-
- -
-
- - - - - - - - -
void fat_close_file (struct fat_file_struct * fd)
-
-
- -

Closes a file.

-
Parameters:
- - -
[in]fdThe file handle of the file to close.
-
-
-
See also:
fat_open_file
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t fat_create_dir (struct fat_dir_struct * parent,
const char * dir,
struct fat_dir_entry_structdir_entry 
)
-
-
- -

Creates a directory.

-

Creates a directory and obtains its directory entry. If the directory to create already exists, its directory entry will be returned within the dir_entry parameter.

-
Note:
The notes which apply to fat_create_file() also apply to this function.
-
Parameters:
- - - - -
[in]parentThe handle of the parent directory of the new directory.
[in]dirThe name of the directory to create.
[out]dir_entryThe directory entry to fill for the new directory.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_delete_dir
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t fat_create_file (struct fat_dir_struct * parent,
const char * file,
struct fat_dir_entry_structdir_entry 
)
-
-
- -

Creates a file.

-

Creates a file and obtains the directory entry of the new file. If the file to create already exists, the directory entry of the existing file will be returned within the dir_entry parameter.

-
Note:
The file name is not checked for invalid characters.
-
-The generation of the short 8.3 file name is quite simple. The first eight characters are used for the filename. The extension, if any, is made up of the first three characters following the last dot within the long filename. If the filename (without the extension) is longer than eight characters, the lower byte of the cluster number replaces the last two characters to avoid name clashes. In any other case, it is your responsibility to avoid name clashes.
-
Parameters:
- - - - -
[in]parentThe handle of the directory in which to create the file.
[in]fileThe name of the file to create.
[out]dir_entryThe directory entry to fill for the new (or existing) file.
-
-
-
Returns:
0 on failure, 1 on success, 2 if the file already existed.
-
See also:
fat_delete_file
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
uint8_t fat_delete_file (struct fat_fs_struct * fs,
struct fat_dir_entry_structdir_entry 
)
-
-
- -

Deletes a file or directory.

-

If a directory is deleted without first deleting its subdirectories and files, disk space occupied by these files will get wasted as there is no chance to release it and mark it as free.

-
Parameters:
- - - -
[in]fsThe filesystem on which to operate.
[in]dir_entryThe directory entry of the file to delete.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_create_file
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t fat_get_dir_entry_of_path (struct fat_fs_struct * fs,
const char * path,
struct fat_dir_entry_structdir_entry 
)
-
-
- -

Retrieves the directory entry of a path.

-

The given path may both describe a file or a directory.

-
Parameters:
- - - - -
[in]fsThe FAT filesystem on which to search.
[in]pathThe path of which to read the directory entry.
[out]dir_entryThe directory entry to fill.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_read_dir
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void fat_get_file_modification_date (const struct fat_dir_entry_structdir_entry,
uint16_t * year,
uint8_t * month,
uint8_t * day 
)
-
-
- -

Returns the modification date of a file.

-
Parameters:
- - - - - -
[in]dir_entryThe directory entry of which to return the modification date.
[out]yearThe year the file was last modified.
[out]monthThe month the file was last modified.
[out]dayThe day the file was last modified.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void fat_get_file_modification_time (const struct fat_dir_entry_structdir_entry,
uint8_t * hour,
uint8_t * min,
uint8_t * sec 
)
-
-
- -

Returns the modification time of a file.

-
Parameters:
- - - - - -
[in]dir_entryThe directory entry of which to return the modification time.
[out]hourThe hour the file was last modified.
[out]minThe min the file was last modified.
[out]secThe sec the file was last modified.
-
-
- -
-
- -
-
- - - - - - - - -
offset_t fat_get_fs_free (const struct fat_fs_struct * fs)
-
-
- -

Returns the amount of free storage capacity on the filesystem in bytes.

-
Note:
As the FAT filesystem is cluster based, this function does not return continuous values but multiples of the cluster size.
-
Parameters:
- - -
[in]fsThe filesystem on which to operate.
-
-
-
Returns:
0 on failure, the free filesystem space in bytes otherwise.
- -
-
- -
-
- - - - - - - - -
offset_t fat_get_fs_size (const struct fat_fs_struct * fs)
-
-
- -

Returns the amount of total storage capacity of the filesystem in bytes.

-
Parameters:
- - -
[in]fsThe filesystem on which to operate.
-
-
-
Returns:
0 on failure, the filesystem size in bytes otherwise.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t fat_move_file (struct fat_fs_struct * fs,
struct fat_dir_entry_structdir_entry,
struct fat_dir_struct * parent_new,
const char * file_new 
)
-
-
- -

Moves or renames a file.

-

Changes a file's name, optionally moving it into another directory as well. Before calling this function, the target file name must not exist. Moving a file to a different filesystem (i.e. parent_new doesn't lie on fs) is not supported.

-

After successfully renaming (and moving) the file, the given directory entry is updated such that it points to the file's new location.

-
Note:
The notes which apply to fat_create_file() also apply to this function.
-
Parameters:
- - - - - -
[in]fsThe filesystem on which to operate.
[in,out]dir_entryThe directory entry of the file to move.
[in]parent_newThe handle of the new parent directory of the file.
[in]file_newThe file's new name.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_create_file, fat_delete_file, fat_move_dir
- -
-
- -
-
- - - - - - - - -
struct fat_fs_struct* fat_open (struct partition_structpartition) [read]
-
-
- -

Opens a FAT filesystem.

-
Parameters:
- - -
[in]partitionDiscriptor of partition on which the filesystem resides.
-
-
-
Returns:
0 on error, a FAT filesystem descriptor on success.
-
See also:
fat_close
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
struct fat_dir_struct* fat_open_dir (struct fat_fs_struct * fs,
const struct fat_dir_entry_structdir_entry 
) [read]
-
-
- -

Opens a directory.

-
Parameters:
- - - -
[in]fsThe filesystem on which the directory to open resides.
[in]dir_entryThe directory entry which stands for the directory to open.
-
-
-
Returns:
An opaque directory descriptor on success, 0 on failure.
-
See also:
fat_close_dir
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
struct fat_file_struct* fat_open_file (struct fat_fs_struct * fs,
const struct fat_dir_entry_structdir_entry 
) [read]
-
-
- -

Opens a file on a FAT filesystem.

-
Parameters:
- - - -
[in]fsThe filesystem on which the file to open lies.
[in]dir_entryThe directory entry of the file to open.
-
-
-
Returns:
The file handle, or 0 on failure.
-
See also:
fat_close_file
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
uint8_t fat_read_dir (struct fat_dir_struct * dd,
struct fat_dir_entry_structdir_entry 
)
-
-
- -

Reads the next directory entry contained within a parent directory.

-
Parameters:
- - - -
[in]ddThe descriptor of the parent directory from which to read the entry.
[out]dir_entryPointer to a buffer into which to write the directory entry information.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_reset_dir
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
intptr_t fat_read_file (struct fat_file_struct * fd,
uint8_t * buffer,
uintptr_t buffer_len 
)
-
-
- -

Reads data from a file.

-

The data requested is read from the current file location.

-
Parameters:
- - - - -
[in]fdThe file handle of the file from which to read.
[out]bufferThe buffer into which to write.
[in]buffer_lenThe amount of data to read.
-
-
-
Returns:
The number of bytes read, 0 on end of file, or -1 on failure.
-
See also:
fat_write_file
- -
-
- -
-
- - - - - - - - -
uint8_t fat_reset_dir (struct fat_dir_struct * dd)
-
-
- -

Resets a directory handle.

-

Resets the directory handle such that reading restarts with the first directory entry.

-
Parameters:
- - -
[in]ddThe directory handle to reset.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_read_dir
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
uint8_t fat_resize_file (struct fat_file_struct * fd,
uint32_t size 
)
-
-
- -

Resizes a file to have a specific size.

-

Enlarges or shrinks the file pointed to by the file descriptor to have exactly the specified size.

-

If the file is truncated, all bytes having an equal or larger offset than the given size are lost. If the file is expanded, the additional bytes are allocated.

-
Note:
Please be aware that this function just allocates or deallocates disk space, it does not explicitely clear it. To avoid data leakage, this must be done manually.
-
Parameters:
- - - -
[in]fdThe file decriptor of the file which to resize.
[in]sizeThe new size of the file.
-
-
-
Returns:
0 on failure, 1 on success.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t fat_seek_file (struct fat_file_struct * fd,
int32_t * offset,
uint8_t whence 
)
-
-
- -

Repositions the read/write file offset.

-

Changes the file offset where the next call to fat_read_file() or fat_write_file() starts reading/writing.

-

If the new offset is beyond the end of the file, fat_resize_file() is implicitly called, i.e. the file is expanded.

-

The new offset can be given in different ways determined by the whence parameter:

-
    -
  • FAT_SEEK_SET: *offset is relative to the beginning of the file.
  • -
  • FAT_SEEK_CUR: *offset is relative to the current file position.
  • -
  • FAT_SEEK_END: *offset is relative to the end of the file.
  • -
-

The resulting absolute offset is written to the location the offset parameter points to.

-

Calling this function can also be used to retrieve the current file position:

-
   int32_t file_pos = 0;
-   if(!fat_seek_file(fd, &file_pos, FAT_SEEK_CUR))
-   {
-       // error
-   }
-   // file_pos now contains the absolute file position
-
Parameters:
- - - - -
[in]fdThe file decriptor of the file on which to seek.
[in,out]offsetA pointer to the new offset, as affected by the whence parameter. The function writes the new absolute offset to this location before it returns.
[in]whenceAffects the way offset is interpreted, see above.
-
-
-
Returns:
0 on failure, 1 on success.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
intptr_t fat_write_file (struct fat_file_struct * fd,
const uint8_t * buffer,
uintptr_t buffer_len 
)
-
-
- -

Writes data to a file.

-

The data is written to the current file location.

-
Parameters:
- - - - -
[in]fdThe file handle of the file to which to write.
[in]bufferThe buffer from which to read the data to be written.
[in]buffer_lenThe amount of data to write.
-
-
-
Returns:
The number of bytes written (0 or something less than buffer_len on disk full) or -1 on failure.
-
See also:
fat_read_file
- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/group__fat__config.html b/final_project/sd_reader/doc/html/group__fat__config.html deleted file mode 100644 index 6a756d7..0000000 --- a/final_project/sd_reader/doc/html/group__fat__config.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - -sd-reader: FAT configuration - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
- -
-
FAT configuration
-
-
- -

Preprocessor defines to configure the FAT implementation. -More...

- - - - - - - - - - - - - - - - - - - - -

-Defines

#define FAT_WRITE_SUPPORT
 Controls FAT write support.
#define FAT_LFN_SUPPORT
 Controls FAT long filename (LFN) support.
#define FAT_DATETIME_SUPPORT
 Controls FAT date and time support.
#define FAT_FAT32_SUPPORT
 Controls FAT32 support.
#define FAT_DELAY_DIRENTRY_UPDATE
 Controls updates of directory entries.
#define fat_get_datetime(year, month, day, hour, min, sec)
 Determines the function used for retrieving current date and time.
-#define FAT_FS_COUNT
 Maximum number of filesystem handles.
-#define FAT_FILE_COUNT
 Maximum number of file handles.
-#define FAT_DIR_COUNT
 Maximum number of directory handles.
-

Detailed Description

-

Preprocessor defines to configure the FAT implementation.

-

Define Documentation

- -
-
- - - - -
#define FAT_DATETIME_SUPPORT
-
-
- -

Controls FAT date and time support.

-

Set to 1 to enable FAT date and time stamping support.

- -
-
- -
-
- - - - -
#define FAT_DELAY_DIRENTRY_UPDATE
-
-
- -

Controls updates of directory entries.

-

Set to 1 to delay directory entry updates until the file is closed. This can boost performance significantly, but may cause data loss if the file is not properly closed.

- -
-
- -
-
- - - - -
#define FAT_FAT32_SUPPORT
-
-
- -

Controls FAT32 support.

-

Set to 1 to enable FAT32 support.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define fat_get_datetime( year,
 month,
 day,
 hour,
 min,
 sec 
)
-
-
- -

Determines the function used for retrieving current date and time.

-

Define this to the function call which shall be used to retrieve current date and time.

-
Note:
Used only when FAT_DATETIME_SUPPORT is 1.
-
Parameters:
- - - - - - - -
[out]yearPointer to a uint16_t which receives the current year.
[out]monthPointer to a uint8_t which receives the current month.
[out]dayPointer to a uint8_t which receives the current day.
[out]hourPointer to a uint8_t which receives the current hour.
[out]minPointer to a uint8_t which receives the current minute.
[out]secPointer to a uint8_t which receives the current sec.
-
-
- -
-
- -
-
- - - - -
#define FAT_LFN_SUPPORT
-
-
- -

Controls FAT long filename (LFN) support.

-

Set to 1 to enable LFN support, set to 0 to disable it.

- -
-
- -
-
- - - - -
#define FAT_WRITE_SUPPORT
-
-
- -

Controls FAT write support.

-

Set to 1 to enable FAT write support, set to 0 to disable it.

- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/group__fat__dir.html b/final_project/sd_reader/doc/html/group__fat__dir.html deleted file mode 100644 index 9c3b972..0000000 --- a/final_project/sd_reader/doc/html/group__fat__dir.html +++ /dev/null @@ -1,359 +0,0 @@ - - - - - -sd-reader: FAT directory functions - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
- -
-
FAT directory functions
-
-
- -

Functions for managing directories. -More...

- - - - - - - - - - - - - - - - -

-Functions

struct fat_dir_struct * fat_open_dir (struct fat_fs_struct *fs, const struct fat_dir_entry_struct *dir_entry)
 Opens a directory.
void fat_close_dir (struct fat_dir_struct *dd)
 Closes a directory descriptor.
uint8_t fat_read_dir (struct fat_dir_struct *dd, struct fat_dir_entry_struct *dir_entry)
 Reads the next directory entry contained within a parent directory.
uint8_t fat_reset_dir (struct fat_dir_struct *dd)
 Resets a directory handle.
uint8_t fat_create_dir (struct fat_dir_struct *parent, const char *dir, struct fat_dir_entry_struct *dir_entry)
 Creates a directory.
uint8_t fat_delete_dir (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry)
 Deletes a directory.
uint8_t fat_move_dir (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry, struct fat_dir_struct *parent_new, const char *dir_new)
 Moves or renames a directory.
-

Detailed Description

-

Functions for managing directories.

-

Function Documentation

- -
-
- - - - - - - - -
void fat_close_dir (struct fat_dir_struct * dd)
-
-
- -

Closes a directory descriptor.

-

This function destroys a directory descriptor which was previously obtained by calling fat_open_dir(). When this function returns, the given descriptor will be invalid.

-
Parameters:
- - -
[in]ddThe directory descriptor to close.
-
-
-
See also:
fat_open_dir
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t fat_create_dir (struct fat_dir_struct * parent,
const char * dir,
struct fat_dir_entry_structdir_entry 
)
-
-
- -

Creates a directory.

-

Creates a directory and obtains its directory entry. If the directory to create already exists, its directory entry will be returned within the dir_entry parameter.

-
Note:
The notes which apply to fat_create_file() also apply to this function.
-
Parameters:
- - - - -
[in]parentThe handle of the parent directory of the new directory.
[in]dirThe name of the directory to create.
[out]dir_entryThe directory entry to fill for the new directory.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_delete_dir
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
uint8_t fat_delete_dir (struct fat_fs_struct * fs,
struct fat_dir_entry_structdir_entry 
)
-
-
- -

Deletes a directory.

-

This is just a synonym for fat_delete_file(). If a directory is deleted without first deleting its subdirectories and files, disk space occupied by these files will get wasted as there is no chance to release it and mark it as free.

-
Parameters:
- - - -
[in]fsThe filesystem on which to operate.
[in]dir_entryThe directory entry of the directory to delete.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_create_dir
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t fat_move_dir (struct fat_fs_struct * fs,
struct fat_dir_entry_structdir_entry,
struct fat_dir_struct * parent_new,
const char * dir_new 
)
-
-
- -

Moves or renames a directory.

-

This is just a synonym for fat_move_file().

-
Parameters:
- - - - - -
[in]fsThe filesystem on which to operate.
[in,out]dir_entryThe directory entry of the directory to move.
[in]parent_newThe handle of the new parent directory.
[in]dir_newThe directory's new name.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_create_dir, fat_delete_dir, fat_move_file
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
struct fat_dir_struct* fat_open_dir (struct fat_fs_struct * fs,
const struct fat_dir_entry_structdir_entry 
) [read]
-
-
- -

Opens a directory.

-
Parameters:
- - - -
[in]fsThe filesystem on which the directory to open resides.
[in]dir_entryThe directory entry which stands for the directory to open.
-
-
-
Returns:
An opaque directory descriptor on success, 0 on failure.
-
See also:
fat_close_dir
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
uint8_t fat_read_dir (struct fat_dir_struct * dd,
struct fat_dir_entry_structdir_entry 
)
-
-
- -

Reads the next directory entry contained within a parent directory.

-
Parameters:
- - - -
[in]ddThe descriptor of the parent directory from which to read the entry.
[out]dir_entryPointer to a buffer into which to write the directory entry information.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_reset_dir
- -
-
- -
-
- - - - - - - - -
uint8_t fat_reset_dir (struct fat_dir_struct * dd)
-
-
- -

Resets a directory handle.

-

Resets the directory handle such that reading restarts with the first directory entry.

-
Parameters:
- - -
[in]ddThe directory handle to reset.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_read_dir
- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/group__fat__file.html b/final_project/sd_reader/doc/html/group__fat__file.html deleted file mode 100644 index f89a4fd..0000000 --- a/final_project/sd_reader/doc/html/group__fat__file.html +++ /dev/null @@ -1,910 +0,0 @@ - - - - - -sd-reader: FAT file functions - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
- -
-
FAT file functions
-
-
- -

Functions for managing files. -More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Structures

struct  fat_dir_entry_struct
 Describes a directory entry. More...

-Defines

#define FAT_ATTRIB_READONLY
 The file is read-only.
#define FAT_ATTRIB_HIDDEN
 The file is hidden.
#define FAT_ATTRIB_SYSTEM
 The file is a system file.
#define FAT_ATTRIB_VOLUME
 The file is empty and has the volume label as its name.
#define FAT_ATTRIB_DIR
 The file is a directory.
#define FAT_ATTRIB_ARCHIVE
 The file has to be archived.
#define FAT_SEEK_SET
 The given offset is relative to the beginning of the file.
#define FAT_SEEK_CUR
 The given offset is relative to the current read/write position.
#define FAT_SEEK_END
 The given offset is relative to the end of the file.

-Functions

uint8_t fat_get_dir_entry_of_path (struct fat_fs_struct *fs, const char *path, struct fat_dir_entry_struct *dir_entry)
 Retrieves the directory entry of a path.
struct fat_file_struct * fat_open_file (struct fat_fs_struct *fs, const struct fat_dir_entry_struct *dir_entry)
 Opens a file on a FAT filesystem.
void fat_close_file (struct fat_file_struct *fd)
 Closes a file.
intptr_t fat_read_file (struct fat_file_struct *fd, uint8_t *buffer, uintptr_t buffer_len)
 Reads data from a file.
intptr_t fat_write_file (struct fat_file_struct *fd, const uint8_t *buffer, uintptr_t buffer_len)
 Writes data to a file.
uint8_t fat_seek_file (struct fat_file_struct *fd, int32_t *offset, uint8_t whence)
 Repositions the read/write file offset.
uint8_t fat_resize_file (struct fat_file_struct *fd, uint32_t size)
 Resizes a file to have a specific size.
uint8_t fat_create_file (struct fat_dir_struct *parent, const char *file, struct fat_dir_entry_struct *dir_entry)
 Creates a file.
uint8_t fat_delete_file (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry)
 Deletes a file or directory.
uint8_t fat_move_file (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry, struct fat_dir_struct *parent_new, const char *file_new)
 Moves or renames a file.
void fat_get_file_modification_date (const struct fat_dir_entry_struct *dir_entry, uint16_t *year, uint8_t *month, uint8_t *day)
 Returns the modification date of a file.
void fat_get_file_modification_time (const struct fat_dir_entry_struct *dir_entry, uint8_t *hour, uint8_t *min, uint8_t *sec)
 Returns the modification time of a file.
void fat_set_file_modification_date (struct fat_dir_entry_struct *dir_entry, uint16_t year, uint8_t month, uint8_t day)
 Sets the modification time of a date.
void fat_set_file_modification_time (struct fat_dir_entry_struct *dir_entry, uint8_t hour, uint8_t min, uint8_t sec)
 Sets the modification time of a file.
-

Detailed Description

-

Functions for managing files.

-

Define Documentation

- -
-
- - - - -
#define FAT_ATTRIB_ARCHIVE
-
-
- -

The file has to be archived.

- -
-
- -
-
- - - - -
#define FAT_ATTRIB_DIR
-
-
- -

The file is a directory.

- -
-
- -
-
- - - - -
#define FAT_ATTRIB_HIDDEN
-
-
- -

The file is hidden.

- -
-
- -
-
- - - - -
#define FAT_ATTRIB_READONLY
-
-
- -

The file is read-only.

- -
-
- -
-
- - - - -
#define FAT_ATTRIB_SYSTEM
-
-
- -

The file is a system file.

- -
-
- -
-
- - - - -
#define FAT_ATTRIB_VOLUME
-
-
- -

The file is empty and has the volume label as its name.

- -
-
- -
-
- - - - -
#define FAT_SEEK_CUR
-
-
- -

The given offset is relative to the current read/write position.

- -
-
- -
-
- - - - -
#define FAT_SEEK_END
-
-
- -

The given offset is relative to the end of the file.

- -
-
- -
-
- - - - -
#define FAT_SEEK_SET
-
-
- -

The given offset is relative to the beginning of the file.

- -
-
-

Function Documentation

- -
-
- - - - - - - - -
void fat_close_file (struct fat_file_struct * fd)
-
-
- -

Closes a file.

-
Parameters:
- - -
[in]fdThe file handle of the file to close.
-
-
-
See also:
fat_open_file
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t fat_create_file (struct fat_dir_struct * parent,
const char * file,
struct fat_dir_entry_structdir_entry 
)
-
-
- -

Creates a file.

-

Creates a file and obtains the directory entry of the new file. If the file to create already exists, the directory entry of the existing file will be returned within the dir_entry parameter.

-
Note:
The file name is not checked for invalid characters.
-
-The generation of the short 8.3 file name is quite simple. The first eight characters are used for the filename. The extension, if any, is made up of the first three characters following the last dot within the long filename. If the filename (without the extension) is longer than eight characters, the lower byte of the cluster number replaces the last two characters to avoid name clashes. In any other case, it is your responsibility to avoid name clashes.
-
Parameters:
- - - - -
[in]parentThe handle of the directory in which to create the file.
[in]fileThe name of the file to create.
[out]dir_entryThe directory entry to fill for the new (or existing) file.
-
-
-
Returns:
0 on failure, 1 on success, 2 if the file already existed.
-
See also:
fat_delete_file
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
uint8_t fat_delete_file (struct fat_fs_struct * fs,
struct fat_dir_entry_structdir_entry 
)
-
-
- -

Deletes a file or directory.

-

If a directory is deleted without first deleting its subdirectories and files, disk space occupied by these files will get wasted as there is no chance to release it and mark it as free.

-
Parameters:
- - - -
[in]fsThe filesystem on which to operate.
[in]dir_entryThe directory entry of the file to delete.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_create_file
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t fat_get_dir_entry_of_path (struct fat_fs_struct * fs,
const char * path,
struct fat_dir_entry_structdir_entry 
)
-
-
- -

Retrieves the directory entry of a path.

-

The given path may both describe a file or a directory.

-
Parameters:
- - - - -
[in]fsThe FAT filesystem on which to search.
[in]pathThe path of which to read the directory entry.
[out]dir_entryThe directory entry to fill.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_read_dir
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void fat_get_file_modification_date (const struct fat_dir_entry_structdir_entry,
uint16_t * year,
uint8_t * month,
uint8_t * day 
)
-
-
- -

Returns the modification date of a file.

-
Parameters:
- - - - - -
[in]dir_entryThe directory entry of which to return the modification date.
[out]yearThe year the file was last modified.
[out]monthThe month the file was last modified.
[out]dayThe day the file was last modified.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void fat_get_file_modification_time (const struct fat_dir_entry_structdir_entry,
uint8_t * hour,
uint8_t * min,
uint8_t * sec 
)
-
-
- -

Returns the modification time of a file.

-
Parameters:
- - - - - -
[in]dir_entryThe directory entry of which to return the modification time.
[out]hourThe hour the file was last modified.
[out]minThe min the file was last modified.
[out]secThe sec the file was last modified.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t fat_move_file (struct fat_fs_struct * fs,
struct fat_dir_entry_structdir_entry,
struct fat_dir_struct * parent_new,
const char * file_new 
)
-
-
- -

Moves or renames a file.

-

Changes a file's name, optionally moving it into another directory as well. Before calling this function, the target file name must not exist. Moving a file to a different filesystem (i.e. parent_new doesn't lie on fs) is not supported.

-

After successfully renaming (and moving) the file, the given directory entry is updated such that it points to the file's new location.

-
Note:
The notes which apply to fat_create_file() also apply to this function.
-
Parameters:
- - - - - -
[in]fsThe filesystem on which to operate.
[in,out]dir_entryThe directory entry of the file to move.
[in]parent_newThe handle of the new parent directory of the file.
[in]file_newThe file's new name.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
fat_create_file, fat_delete_file, fat_move_dir
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
struct fat_file_struct* fat_open_file (struct fat_fs_struct * fs,
const struct fat_dir_entry_structdir_entry 
) [read]
-
-
- -

Opens a file on a FAT filesystem.

-
Parameters:
- - - -
[in]fsThe filesystem on which the file to open lies.
[in]dir_entryThe directory entry of the file to open.
-
-
-
Returns:
The file handle, or 0 on failure.
-
See also:
fat_close_file
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
intptr_t fat_read_file (struct fat_file_struct * fd,
uint8_t * buffer,
uintptr_t buffer_len 
)
-
-
- -

Reads data from a file.

-

The data requested is read from the current file location.

-
Parameters:
- - - - -
[in]fdThe file handle of the file from which to read.
[out]bufferThe buffer into which to write.
[in]buffer_lenThe amount of data to read.
-
-
-
Returns:
The number of bytes read, 0 on end of file, or -1 on failure.
-
See also:
fat_write_file
- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
uint8_t fat_resize_file (struct fat_file_struct * fd,
uint32_t size 
)
-
-
- -

Resizes a file to have a specific size.

-

Enlarges or shrinks the file pointed to by the file descriptor to have exactly the specified size.

-

If the file is truncated, all bytes having an equal or larger offset than the given size are lost. If the file is expanded, the additional bytes are allocated.

-
Note:
Please be aware that this function just allocates or deallocates disk space, it does not explicitely clear it. To avoid data leakage, this must be done manually.
-
Parameters:
- - - -
[in]fdThe file decriptor of the file which to resize.
[in]sizeThe new size of the file.
-
-
-
Returns:
0 on failure, 1 on success.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t fat_seek_file (struct fat_file_struct * fd,
int32_t * offset,
uint8_t whence 
)
-
-
- -

Repositions the read/write file offset.

-

Changes the file offset where the next call to fat_read_file() or fat_write_file() starts reading/writing.

-

If the new offset is beyond the end of the file, fat_resize_file() is implicitly called, i.e. the file is expanded.

-

The new offset can be given in different ways determined by the whence parameter:

-
    -
  • FAT_SEEK_SET: *offset is relative to the beginning of the file.
  • -
  • FAT_SEEK_CUR: *offset is relative to the current file position.
  • -
  • FAT_SEEK_END: *offset is relative to the end of the file.
  • -
-

The resulting absolute offset is written to the location the offset parameter points to.

-

Calling this function can also be used to retrieve the current file position:

-
   int32_t file_pos = 0;
-   if(!fat_seek_file(fd, &file_pos, FAT_SEEK_CUR))
-   {
-       // error
-   }
-   // file_pos now contains the absolute file position
-
Parameters:
- - - - -
[in]fdThe file decriptor of the file on which to seek.
[in,out]offsetA pointer to the new offset, as affected by the whence parameter. The function writes the new absolute offset to this location before it returns.
[in]whenceAffects the way offset is interpreted, see above.
-
-
-
Returns:
0 on failure, 1 on success.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void fat_set_file_modification_date (struct fat_dir_entry_structdir_entry,
uint16_t year,
uint8_t month,
uint8_t day 
)
-
-
- -

Sets the modification time of a date.

-
Parameters:
- - - - - -
[in]dir_entryThe directory entry for which to set the modification date.
[in]yearThe year the file was last modified.
[in]monthThe month the file was last modified.
[in]dayThe day the file was last modified.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void fat_set_file_modification_time (struct fat_dir_entry_structdir_entry,
uint8_t hour,
uint8_t min,
uint8_t sec 
)
-
-
- -

Sets the modification time of a file.

-
Parameters:
- - - - - -
[in]dir_entryThe directory entry for which to set the modification time.
[in]hourThe year the file was last modified.
[in]minThe month the file was last modified.
[in]secThe day the file was last modified.
-
-
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
intptr_t fat_write_file (struct fat_file_struct * fd,
const uint8_t * buffer,
uintptr_t buffer_len 
)
-
-
- -

Writes data to a file.

-

The data is written to the current file location.

-
Parameters:
- - - - -
[in]fdThe file handle of the file to which to write.
[in]bufferThe buffer from which to read the data to be written.
[in]buffer_lenThe amount of data to write.
-
-
-
Returns:
The number of bytes written (0 or something less than buffer_len on disk full) or -1 on failure.
-
See also:
fat_read_file
- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/group__fat__fs.html b/final_project/sd_reader/doc/html/group__fat__fs.html deleted file mode 100644 index b2de2b9..0000000 --- a/final_project/sd_reader/doc/html/group__fat__fs.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - -sd-reader: FAT access - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
- -
-
FAT access
-
-
- -

Basic functions for handling a FAT filesystem. -More...

- - - - - - - - - - - - -

-Functions

struct fat_fs_struct * fat_open (struct partition_struct *partition)
 Opens a FAT filesystem.
void fat_close (struct fat_fs_struct *fs)
 Closes a FAT filesystem.
offset_t fat_get_fs_size (const struct fat_fs_struct *fs)
 Returns the amount of total storage capacity of the filesystem in bytes.
offset_t fat_get_fs_free (const struct fat_fs_struct *fs)
 Returns the amount of free storage capacity on the filesystem in bytes.
-uint8_t fat_get_fs_free_32_callback (uint8_t *buffer, offset_t offset, void *p)
 Callback function used for counting free clusters in a FAT32.
-

Detailed Description

-

Basic functions for handling a FAT filesystem.

-

Function Documentation

- -
-
- - - - - - - - -
void fat_close (struct fat_fs_struct * fs)
-
-
- -

Closes a FAT filesystem.

-

When this function returns, the given filesystem descriptor will be invalid.

-
Parameters:
- - -
[in]fsThe filesystem to close.
-
-
-
See also:
fat_open
- -
-
- -
-
- - - - - - - - -
offset_t fat_get_fs_free (const struct fat_fs_struct * fs)
-
-
- -

Returns the amount of free storage capacity on the filesystem in bytes.

-
Note:
As the FAT filesystem is cluster based, this function does not return continuous values but multiples of the cluster size.
-
Parameters:
- - -
[in]fsThe filesystem on which to operate.
-
-
-
Returns:
0 on failure, the free filesystem space in bytes otherwise.
- -
-
- -
-
- - - - - - - - -
offset_t fat_get_fs_size (const struct fat_fs_struct * fs)
-
-
- -

Returns the amount of total storage capacity of the filesystem in bytes.

-
Parameters:
- - -
[in]fsThe filesystem on which to operate.
-
-
-
Returns:
0 on failure, the filesystem size in bytes otherwise.
- -
-
- -
-
- - - - - - - - -
struct fat_fs_struct* fat_open (struct partition_structpartition) [read]
-
-
- -

Opens a FAT filesystem.

-
Parameters:
- - -
[in]partitionDiscriptor of partition on which the filesystem resides.
-
-
-
Returns:
0 on error, a FAT filesystem descriptor on success.
-
See also:
fat_close
- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/group__partition.html b/final_project/sd_reader/doc/html/group__partition.html deleted file mode 100644 index 63904de..0000000 --- a/final_project/sd_reader/doc/html/group__partition.html +++ /dev/null @@ -1,394 +0,0 @@ - - - - - -sd-reader: Partition table support - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
- -
-
Partition table support
-
-
- -

Support for reading partition tables and access to partitions. -More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Structures

struct  partition_struct
 Describes a partition. More...

-Modules

 Configuration of partition table support
 

Preprocessor defines to configure the partition support.

-

-Files

file  partition.c
 

Partition table implementation (license: GPLv2 or LGPLv2.1)

-
file  partition.h
 

Partition table header (license: GPLv2 or LGPLv2.1)

-
file  partition_config.h
 

Partition configuration (license: GPLv2 or LGPLv2.1)

-

-Defines

-#define PARTITION_TYPE_FREE
 The partition table entry is not used.
-#define PARTITION_TYPE_FAT12
 The partition contains a FAT12 filesystem.
-#define PARTITION_TYPE_FAT16_32MB
 The partition contains a FAT16 filesystem with 32MB maximum.
-#define PARTITION_TYPE_EXTENDED
 The partition is an extended partition with its own partition table.
-#define PARTITION_TYPE_FAT16
 The partition contains a FAT16 filesystem.
-#define PARTITION_TYPE_FAT32
 The partition contains a FAT32 filesystem.
-#define PARTITION_TYPE_FAT32_LBA
 The partition contains a FAT32 filesystem with LBA.
-#define PARTITION_TYPE_FAT16_LBA
 The partition contains a FAT16 filesystem with LBA.
-#define PARTITION_TYPE_EXTENDED_LBA
 The partition is an extended partition with LBA.
-#define PARTITION_TYPE_UNKNOWN
 The partition has an unknown type.

-Typedefs

typedef uint8_t(* device_read_t )(offset_t offset, uint8_t *buffer, uintptr_t length)
 A function pointer used to read from the partition.
typedef uint8_t(* device_read_callback_t )(uint8_t *buffer, offset_t offset, void *p)
 A function pointer passed to a device_read_interval_t.
typedef uint8_t(* device_read_interval_t )(offset_t offset, uint8_t *buffer, uintptr_t interval, uintptr_t length, device_read_callback_t callback, void *p)
 A function pointer used to continuously read units of interval bytes and call a callback function.
typedef uint8_t(* device_write_t )(offset_t offset, const uint8_t *buffer, uintptr_t length)
 A function pointer used to write to the partition.
typedef uintptr_t(* device_write_callback_t )(uint8_t *buffer, offset_t offset, void *p)
 A function pointer passed to a device_write_interval_t.
typedef uint8_t(* device_write_interval_t )(offset_t offset, uint8_t *buffer, uintptr_t length, device_write_callback_t callback, void *p)
 A function pointer used to continuously write a data stream obtained from a callback function.

-Functions

struct partition_structpartition_open (device_read_t device_read, device_read_interval_t device_read_interval, device_write_t device_write, device_write_interval_t device_write_interval, int8_t index)
 Opens a partition.
uint8_t partition_close (struct partition_struct *partition)
 Closes a partition.
-

Detailed Description

-

Support for reading partition tables and access to partitions.

-

Typedef Documentation

- -
-
- - - - -
typedef uint8_t(* device_read_callback_t)(uint8_t *buffer, offset_t offset, void *p)
-
-
- -

A function pointer passed to a device_read_interval_t.

-
Parameters:
- - - - -
[in]bufferThe buffer which contains the data just read.
[in]offsetThe offset from which the data in buffer was read.
[in]pAn opaque pointer.
-
-
-
See also:
device_read_interval_t
- -
-
- -
-
- - - - -
typedef uint8_t(* device_read_interval_t)(offset_t offset, uint8_t *buffer, uintptr_t interval, uintptr_t length, device_read_callback_t callback, void *p)
-
-
- -

A function pointer used to continuously read units of interval bytes and call a callback function.

-

This function starts reading at the specified offset. Every interval bytes, it calls the callback function with the associated data buffer.

-

By returning zero, the callback may stop reading.

-
Parameters:
- - - - - - - -
[in]offsetOffset from which to start reading.
[in]bufferPointer to a buffer which is at least interval bytes in size.
[in]intervalNumber of bytes to read before calling the callback function.
[in]lengthNumber of bytes to read altogether.
[in]callbackThe function to call every interval bytes.
[in]pAn opaque pointer directly passed to the callback function.
-
-
-
Returns:
0 on failure, 1 on success
-
See also:
device_read_t
- -
-
- -
-
- - - - -
typedef uint8_t(* device_read_t)(offset_t offset, uint8_t *buffer, uintptr_t length)
-
-
- -

A function pointer used to read from the partition.

-
Parameters:
- - - - -
[in]offsetThe offset on the device where to start reading.
[out]bufferThe buffer into which to place the data.
[in]lengthThe count of bytes to read.
-
-
- -
-
- -
-
- - - - -
typedef uintptr_t(* device_write_callback_t)(uint8_t *buffer, offset_t offset, void *p)
-
-
- -

A function pointer passed to a device_write_interval_t.

-
Parameters:
- - - - -
[in]bufferThe buffer which receives the data to write.
[in]offsetThe offset to which the data in buffer will be written.
[in]pAn opaque pointer.
-
-
-
Returns:
The number of bytes put into buffer
-
See also:
device_write_interval_t
- -
-
- -
-
- - - - -
typedef uint8_t(* device_write_interval_t)(offset_t offset, uint8_t *buffer, uintptr_t length, device_write_callback_t callback, void *p)
-
-
- -

A function pointer used to continuously write a data stream obtained from a callback function.

-

This function starts writing at the specified offset. To obtain the next bytes to write, it calls the callback function. The callback fills the provided data buffer and returns the number of bytes it has put into the buffer.

-

By returning zero, the callback may stop writing.

-
Parameters:
- - - - - - -
[in]offsetOffset where to start writing.
[in]bufferPointer to a buffer which is used for the callback function.
[in]lengthNumber of bytes to write in total. May be zero for endless writes.
[in]callbackThe function used to obtain the bytes to write.
[in]pAn opaque pointer directly passed to the callback function.
-
-
-
Returns:
0 on failure, 1 on success
-
See also:
device_write_t
- -
-
- -
-
- - - - -
typedef uint8_t(* device_write_t)(offset_t offset, const uint8_t *buffer, uintptr_t length)
-
-
- -

A function pointer used to write to the partition.

-
Parameters:
- - - - -
[in]offsetThe offset on the device where to start writing.
[in]bufferThe buffer which to write.
[in]lengthThe count of bytes to write.
-
-
- -
-
-

Function Documentation

- -
-
- - - - - - - - -
uint8_t partition_close (struct partition_structpartition)
-
-
- -

Closes a partition.

-

This function destroys a partition descriptor which was previously obtained from a call to partition_open(). When this function returns, the given descriptor will be invalid.

-
Parameters:
- - -
[in]partitionThe partition descriptor to destroy.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
partition_open
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
struct partition_struct * partition_open (device_read_t device_read,
device_read_interval_t device_read_interval,
device_write_t device_write,
device_write_interval_t device_write_interval,
int8_t index 
) [read]
-
-
- -

Opens a partition.

-

Opens a partition by its index number and returns a partition handle which describes the opened partition.

-
Note:
This function does not support extended partitions.
-
Parameters:
- - - - - - -
[in]device_readA function pointer which is used to read from the disk.
[in]device_read_intervalA function pointer which is used to read in constant intervals from the disk.
[in]device_writeA function pointer which is used to write to the disk.
[in]device_write_intervalA function pointer which is used to write a data stream to disk.
[in]indexThe index of the partition which should be opened, range 0 to 3. A negative value is allowed as well. In this case, the partition opened is not checked for existance, begins at offset zero, has a length of zero and is of an unknown type. Use this in case you want to open the whole device as a single partition (e.g. for "super floppy" use).
-
-
-
Returns:
0 on failure, a partition descriptor on success.
-
See also:
partition_close
- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/group__partition__config.html b/final_project/sd_reader/doc/html/group__partition__config.html deleted file mode 100644 index 7e02967..0000000 --- a/final_project/sd_reader/doc/html/group__partition__config.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - -sd-reader: Configuration of partition table support - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
- -
-
Configuration of partition table support
-
-
- -

Preprocessor defines to configure the partition support. -More...

- - - - -

-Defines

-#define PARTITION_COUNT
 Maximum number of partition handles.
-

Detailed Description

-

Preprocessor defines to configure the partition support.

-
- - - - - - diff --git a/final_project/sd_reader/doc/html/group__sd__raw.html b/final_project/sd_reader/doc/html/group__sd__raw.html deleted file mode 100644 index ee8dace..0000000 --- a/final_project/sd_reader/doc/html/group__sd__raw.html +++ /dev/null @@ -1,465 +0,0 @@ - - - - - -sd-reader: MMC/SD/SDHC card raw access - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
- -
-
MMC/SD/SDHC card raw access
-
-
- -

This module implements read and write access to MMC, SD and SDHC cards. -More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Structures

struct  sd_raw_info
 This struct is used by sd_raw_get_info() to return manufacturing and status information of the card. More...

-Modules

 MMC/SD configuration
 

Preprocessor defines to configure the MMC/SD support.

-

-Files

file  sd_raw.c
 

MMC/SD/SDHC raw access implementation (license: GPLv2 or LGPLv2.1)

-
file  sd_raw.h
 

MMC/SD/SDHC raw access header (license: GPLv2 or LGPLv2.1)

-
file  sd_raw_config.h
 

MMC/SD support configuration (license: GPLv2 or LGPLv2.1)

-

-Defines

-#define SD_RAW_FORMAT_HARDDISK
 The card's layout is harddisk-like, which means it contains a master boot record with a partition table.
-#define SD_RAW_FORMAT_SUPERFLOPPY
 The card contains a single filesystem and no partition table.
-#define SD_RAW_FORMAT_UNIVERSAL
 The card's layout follows the Universal File Format.
-#define SD_RAW_FORMAT_UNKNOWN
 The card's layout is unknown.

-Functions

uint8_t sd_raw_init ()
 Initializes memory card communication.
uint8_t sd_raw_available ()
 Checks wether a memory card is located in the slot.
uint8_t sd_raw_locked ()
 Checks wether the memory card is locked for write access.
uint8_t sd_raw_read (offset_t offset, uint8_t *buffer, uintptr_t length)
 Reads raw data from the card.
uint8_t sd_raw_read_interval (offset_t offset, uint8_t *buffer, uintptr_t interval, uintptr_t length, sd_raw_read_interval_handler_t callback, void *p)
 Continuously reads units of interval bytes and calls a callback function.
uint8_t sd_raw_write (offset_t offset, const uint8_t *buffer, uintptr_t length)
 Writes raw data to the card.
uint8_t sd_raw_write_interval (offset_t offset, uint8_t *buffer, uintptr_t length, sd_raw_write_interval_handler_t callback, void *p)
 Writes a continuous data stream obtained from a callback function.
uint8_t sd_raw_sync ()
 Writes the write buffer's content to the card.
uint8_t sd_raw_get_info (struct sd_raw_info *info)
 Reads informational data from the card.
-

Detailed Description

-

This module implements read and write access to MMC, SD and SDHC cards.

-

It serves as a low-level driver for the higher level modules such as partition and file system access.

-

Function Documentation

- -
-
- - - - - - - -
uint8_t sd_raw_available ()
-
-
- -

Checks wether a memory card is located in the slot.

-
Returns:
1 if the card is available, 0 if it is not.
- -
-
- -
-
- - - - - - - - -
uint8_t sd_raw_get_info (struct sd_raw_infoinfo)
-
-
- -

Reads informational data from the card.

-

This function reads and returns the card's registers containing manufacturing and status information.

-
Note:
: The information retrieved by this function is not required in any way to operate on the card, but it might be nice to display some of the data to the user.
-
Parameters:
- - -
[in]infoA pointer to the structure into which to save the information.
-
-
-
Returns:
0 on failure, 1 on success.
- -
-
- -
-
- - - - - - - -
uint8_t sd_raw_init ()
-
-
- -

Initializes memory card communication.

-
Returns:
0 on failure, 1 on success.
- -
-
- -
-
- - - - - - - -
uint8_t sd_raw_locked ()
-
-
- -

Checks wether the memory card is locked for write access.

-
Returns:
1 if the card is locked, 0 if it is not.
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t sd_raw_read (offset_t offset,
uint8_t * buffer,
uintptr_t length 
)
-
-
- -

Reads raw data from the card.

-
Parameters:
- - - - -
[in]offsetThe offset from which to read.
[out]bufferThe buffer into which to write the data.
[in]lengthThe number of bytes to read.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
sd_raw_read_interval, sd_raw_write, sd_raw_write_interval
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t sd_raw_read_interval (offset_t offset,
uint8_t * buffer,
uintptr_t interval,
uintptr_t length,
sd_raw_read_interval_handler_t callback,
void * p 
)
-
-
- -

Continuously reads units of interval bytes and calls a callback function.

-

This function starts reading at the specified offset. Every interval bytes, it calls the callback function with the associated data buffer.

-

By returning zero, the callback may stop reading.

-
Note:
Within the callback function, you can not start another read or write operation.
-
-This function only works if the following conditions are met:
    -
  • (offset - (offset % 512)) % interval == 0
  • -
  • length % interval == 0
  • -
-
-
Parameters:
- - - - - - - -
[in]offsetOffset from which to start reading.
[in]bufferPointer to a buffer which is at least interval bytes in size.
[in]intervalNumber of bytes to read before calling the callback function.
[in]lengthNumber of bytes to read altogether.
[in]callbackThe function to call every interval bytes.
[in]pAn opaque pointer directly passed to the callback function.
-
-
-
Returns:
0 on failure, 1 on success
-
See also:
sd_raw_write_interval, sd_raw_read, sd_raw_write
- -
-
- -
-
- - - - - - - -
uint8_t sd_raw_sync ()
-
-
- -

Writes the write buffer's content to the card.

-
Note:
When write buffering is enabled, you should call this function before disconnecting the card to ensure all remaining data has been written.
-
Returns:
0 on failure, 1 on success.
-
See also:
sd_raw_write
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t sd_raw_write (offset_t offset,
const uint8_t * buffer,
uintptr_t length 
)
-
-
- -

Writes raw data to the card.

-
Note:
If write buffering is enabled, you might have to call sd_raw_sync() before disconnecting the card to ensure all remaining data has been written.
-
Parameters:
- - - - -
[in]offsetThe offset where to start writing.
[in]bufferThe buffer containing the data to be written.
[in]lengthThe number of bytes to write.
-
-
-
Returns:
0 on failure, 1 on success.
-
See also:
sd_raw_write_interval, sd_raw_read, sd_raw_read_interval
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uint8_t sd_raw_write_interval (offset_t offset,
uint8_t * buffer,
uintptr_t length,
sd_raw_write_interval_handler_t callback,
void * p 
)
-
-
- -

Writes a continuous data stream obtained from a callback function.

-

This function starts writing at the specified offset. To obtain the next bytes to write, it calls the callback function. The callback fills the provided data buffer and returns the number of bytes it has put into the buffer.

-

By returning zero, the callback may stop writing.

-
Parameters:
- - - - - - -
[in]offsetOffset where to start writing.
[in]bufferPointer to a buffer which is used for the callback function.
[in]lengthNumber of bytes to write in total. May be zero for endless writes.
[in]callbackThe function used to obtain the bytes to write.
[in]pAn opaque pointer directly passed to the callback function.
-
-
-
Returns:
0 on failure, 1 on success
-
See also:
sd_raw_read_interval, sd_raw_write, sd_raw_read
- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/group__sd__raw__config.html b/final_project/sd_reader/doc/html/group__sd__raw__config.html deleted file mode 100644 index 2d3ebef..0000000 --- a/final_project/sd_reader/doc/html/group__sd__raw__config.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - -sd-reader: MMC/SD configuration - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
- -
-
MMC/SD configuration
-
-
- -

Preprocessor defines to configure the MMC/SD support. -More...

- - - - - - - - - - - - -

-Defines

#define SD_RAW_WRITE_SUPPORT
 Controls MMC/SD write support.
#define SD_RAW_WRITE_BUFFERING
 Controls MMC/SD write buffering.
#define SD_RAW_SAVE_RAM
 Controls MMC/SD access buffering.
#define SD_RAW_SAVE_RAM
 Controls MMC/SD access buffering.
#define SD_RAW_SDHC
 Controls support for SDHC cards.
-

Detailed Description

-

Preprocessor defines to configure the MMC/SD support.

-

Define Documentation

- -
-
- - - - -
#define SD_RAW_SAVE_RAM
-
-
- -

Controls MMC/SD access buffering.

-

Set to 1 to save static RAM, but be aware that you will lose performance.

-
Note:
When SD_RAW_WRITE_SUPPORT is 1, SD_RAW_SAVE_RAM will be reset to 0.
- -
-
- -
-
- - - - -
#define SD_RAW_SAVE_RAM
-
-
- -

Controls MMC/SD access buffering.

-

Set to 1 to save static RAM, but be aware that you will lose performance.

-
Note:
When SD_RAW_WRITE_SUPPORT is 1, SD_RAW_SAVE_RAM will be reset to 0.
- -
-
- -
-
- - - - -
#define SD_RAW_SDHC
-
-
- -

Controls support for SDHC cards.

-

Set to 1 to support so-called SDHC memory cards, i.e. SD cards with more than 2 gigabytes of memory.

- -
-
- -
-
- - - - -
#define SD_RAW_WRITE_BUFFERING
-
-
- -

Controls MMC/SD write buffering.

-

Set to 1 to buffer write accesses, set to 0 to disable it.

-
Note:
This option has no effect when SD_RAW_WRITE_SUPPORT is 0.
- -
-
- -
-
- - - - -
#define SD_RAW_WRITE_SUPPORT
-
-
- -

Controls MMC/SD write support.

-

Set to 1 to enable MMC/SD write support, set to 0 to disable it.

- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/index.html b/final_project/sd_reader/doc/html/index.html deleted file mode 100644 index 4881aa0..0000000 --- a/final_project/sd_reader/doc/html/index.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - -sd-reader: MMC/SD/SDHC card library - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
-
-
MMC/SD/SDHC card library
-
-
-

This project provides a general purpose library which implements read and write support for MMC, SD and SDHC memory cards. It includes

- -

-The circuit

-

The circuit which was mainly used during development consists of an Atmel AVR microcontroller with some passive components. It is quite simple and provides an easy test environment. The circuit which can be downloaded on the project homepage has been improved with regard to operation stability.

-

I used different microcontrollers during development, the ATmega8 with 8kBytes of flash, and its pin-compatible alternative, the ATmega168 with 16kBytes flash. The first one is the one I started with, but when I implemented FAT16 write support, I ran out of flash space and switched to the ATmega168. For FAT32, an ATmega328 is required.

-

The circuit board is a self-made and self-soldered board consisting of a single copper layer and standard DIL components, except of the MMC/SD card connector.

-

The connector is soldered to the bottom side of the board. It has a simple eject button which, when a card is inserted, needs some space beyond the connector itself. As an additional feature the connector has two electrical switches to detect wether a card is inserted and wether this card is write-protected.

-

-Pictures

-
-pic01.jpg -
-The circuit board used to implement and test this application.
-
-pic02.jpg -
-The MMC/SD card connector on the soldering side of the circuit board.
-

-The software

-

The software is written in C (ISO C99). It might not be the smallest or the fastest one, but I think it is quite flexible. See the project's benchmark page to get an idea of the possible data rates.

-

I implemented an example application providing a simple command prompt which is accessible via the UART at 9600 Baud. With commands similiar to the Unix shell you can browse different directories, read and write files, create new ones and delete them again. Not all commands are available in all software configurations.

-
    -
  • cat <file>
    - Writes a hexdump of <file> to the terminal.
  • -
  • cd <directory>
    - Changes current working directory to <directory>.
  • -
  • disk
    - Shows card manufacturer, status, filesystem capacity and free storage space.
  • -
  • init
    - Reinitializes and reopens the memory card.
  • -
  • ls
    - Shows the content of the current directory.
  • -
  • mkdir <directory>
    - Creates a directory called <directory>.
  • -
  • mv <file> <file_new>
    - Renames <file> to <file_new>.
  • -
  • rm <file>
    - Deletes <file>.
  • -
  • sync
    - Ensures all buffered data is written to the card.
  • -
  • touch <file>
    - Creates <file>.
  • -
  • write <file> <offset>
    - Writes text to <file>, starting from <offset>. The text is read from the UART, line by line. Finish with an empty line.
  • -
- -

- The following table shows some typical code sizes in bytes, using the 20090330 release with a - buffered read-write MMC/SD configuration, FAT16 and static memory allocation: -

- - - - - - - - - - - - - - - - - - - - - - -
layercode sizestatic RAM usage
MMC/SD2410518
Partition45617
FAT167928188
- -

- The static RAM is mostly used for buffering memory card access, which - improves performance and reduces implementation complexity. -

- -

- Please note that the numbers above do not include the C library functions - used, e.g. some string functions. These will raise the numbers somewhat - if they are not already used in other program parts. -

- -

- When opening a partition, filesystem, file or directory, a little amount - of RAM is used, as listed in the following table. Depending on the library - configuration, the memory is either allocated statically or dynamically. -

- - - - - - - - - - - - - - - - - - - - - - -
descriptordynamic/static RAM
partition17
filesystem26
file53
directory49
- -

-Adapting the software to your needs

-

The only hardware dependent part is the communication layer talking to the memory card. The other parts like partition table and FAT support are completely independent, you could use them even for managing Compact Flash cards or standard ATAPI hard disks.

-

By changing the MCU* variables in the Makefile, you can use other Atmel microcontrollers or different clock speeds. You might also want to change the configuration defines in the files fat_config.h, partition_config.h, sd_raw_config.h and sd-reader_config.h. For example, you could disable write support completely if you only need read support.

-

For further information, visit the project's FAQ page.

-

-Bugs or comments?

-

If you have comments or found a bug in the software - there might be some of them - you may contact me per mail at feedback@roland-riegel.de.

-

-Acknowledgements

-

Thanks go to Ulrich Radig, who explained on his homepage how to interface MMC cards to the Atmel microcontroller (http://www.ulrichradig.de/). I adapted his work for my circuit.

-

-Copyright 2006-2012 by Roland Riegel

-

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation (http://www.gnu.org/copyleft/gpl.html). At your option, you can alternatively redistribute and/or modify the following files under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation (http://www.gnu.org/copyleft/lgpl.html):

- -
- - - - - - diff --git a/final_project/sd_reader/doc/html/modules.html b/final_project/sd_reader/doc/html/modules.html deleted file mode 100644 index 977ea81..0000000 --- a/final_project/sd_reader/doc/html/modules.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - -sd-reader: Modules - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - -
-
-
-
Modules
-
- - - - - - - diff --git a/final_project/sd_reader/doc/html/nav_f.png b/final_project/sd_reader/doc/html/nav_f.png deleted file mode 100644 index 1b07a16..0000000 Binary files a/final_project/sd_reader/doc/html/nav_f.png and /dev/null differ diff --git a/final_project/sd_reader/doc/html/nav_h.png b/final_project/sd_reader/doc/html/nav_h.png deleted file mode 100644 index 01f5fa6..0000000 Binary files a/final_project/sd_reader/doc/html/nav_h.png and /dev/null differ diff --git a/final_project/sd_reader/doc/html/open.png b/final_project/sd_reader/doc/html/open.png deleted file mode 100644 index 7b35d2c..0000000 Binary files a/final_project/sd_reader/doc/html/open.png and /dev/null differ diff --git a/final_project/sd_reader/doc/html/partition_8c.html b/final_project/sd_reader/doc/html/partition_8c.html deleted file mode 100644 index 783028d..0000000 --- a/final_project/sd_reader/doc/html/partition_8c.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - -sd-reader: partition.c File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
partition.c File Reference
-
-
- -

Partition table implementation (license: GPLv2 or LGPLv2.1) -More...

- - - - - - -

-Functions

struct partition_structpartition_open (device_read_t device_read, device_read_interval_t device_read_interval, device_write_t device_write, device_write_interval_t device_write_interval, int8_t index)
 Opens a partition.
uint8_t partition_close (struct partition_struct *partition)
 Closes a partition.
-

Detailed Description

-

Partition table implementation (license: GPLv2 or LGPLv2.1)

-
Author:
Roland Riegel
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/partition_8h.html b/final_project/sd_reader/doc/html/partition_8h.html deleted file mode 100644 index 9f3380c..0000000 --- a/final_project/sd_reader/doc/html/partition_8h.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -sd-reader: partition.h File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
partition.h File Reference
-
-
- -

Partition table header (license: GPLv2 or LGPLv2.1) -More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Structures

struct  partition_struct
 Describes a partition. More...

-Defines

-#define PARTITION_TYPE_FREE
 The partition table entry is not used.
-#define PARTITION_TYPE_FAT12
 The partition contains a FAT12 filesystem.
-#define PARTITION_TYPE_FAT16_32MB
 The partition contains a FAT16 filesystem with 32MB maximum.
-#define PARTITION_TYPE_EXTENDED
 The partition is an extended partition with its own partition table.
-#define PARTITION_TYPE_FAT16
 The partition contains a FAT16 filesystem.
-#define PARTITION_TYPE_FAT32
 The partition contains a FAT32 filesystem.
-#define PARTITION_TYPE_FAT32_LBA
 The partition contains a FAT32 filesystem with LBA.
-#define PARTITION_TYPE_FAT16_LBA
 The partition contains a FAT16 filesystem with LBA.
-#define PARTITION_TYPE_EXTENDED_LBA
 The partition is an extended partition with LBA.
-#define PARTITION_TYPE_UNKNOWN
 The partition has an unknown type.

-Typedefs

typedef uint8_t(* device_read_t )(offset_t offset, uint8_t *buffer, uintptr_t length)
 A function pointer used to read from the partition.
typedef uint8_t(* device_read_callback_t )(uint8_t *buffer, offset_t offset, void *p)
 A function pointer passed to a device_read_interval_t.
typedef uint8_t(* device_read_interval_t )(offset_t offset, uint8_t *buffer, uintptr_t interval, uintptr_t length, device_read_callback_t callback, void *p)
 A function pointer used to continuously read units of interval bytes and call a callback function.
typedef uint8_t(* device_write_t )(offset_t offset, const uint8_t *buffer, uintptr_t length)
 A function pointer used to write to the partition.
typedef uintptr_t(* device_write_callback_t )(uint8_t *buffer, offset_t offset, void *p)
 A function pointer passed to a device_write_interval_t.
typedef uint8_t(* device_write_interval_t )(offset_t offset, uint8_t *buffer, uintptr_t length, device_write_callback_t callback, void *p)
 A function pointer used to continuously write a data stream obtained from a callback function.

-Functions

struct partition_structpartition_open (device_read_t device_read, device_read_interval_t device_read_interval, device_write_t device_write, device_write_interval_t device_write_interval, int8_t index)
 Opens a partition.
uint8_t partition_close (struct partition_struct *partition)
 Closes a partition.
-

Detailed Description

-

Partition table header (license: GPLv2 or LGPLv2.1)

-
Author:
Roland Riegel
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/partition__config_8h.html b/final_project/sd_reader/doc/html/partition__config_8h.html deleted file mode 100644 index b1fbf70..0000000 --- a/final_project/sd_reader/doc/html/partition__config_8h.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - -sd-reader: partition_config.h File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
partition_config.h File Reference
-
-
- -

Partition configuration (license: GPLv2 or LGPLv2.1) -More...

- - - - -

-Defines

-#define PARTITION_COUNT
 Maximum number of partition handles.
-

Detailed Description

-

Partition configuration (license: GPLv2 or LGPLv2.1)

-
- - - - - - diff --git a/final_project/sd_reader/doc/html/pic01.jpg b/final_project/sd_reader/doc/html/pic01.jpg deleted file mode 100644 index 7eb9383..0000000 Binary files a/final_project/sd_reader/doc/html/pic01.jpg and /dev/null differ diff --git a/final_project/sd_reader/doc/html/pic02.jpg b/final_project/sd_reader/doc/html/pic02.jpg deleted file mode 100644 index e490c4d..0000000 Binary files a/final_project/sd_reader/doc/html/pic02.jpg and /dev/null differ diff --git a/final_project/sd_reader/doc/html/sd-reader__config_8h.html b/final_project/sd_reader/doc/html/sd-reader__config_8h.html deleted file mode 100644 index a751d18..0000000 --- a/final_project/sd_reader/doc/html/sd-reader__config_8h.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - -sd-reader: sd-reader_config.h File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
sd-reader_config.h File Reference
-
-
- -

Common sd-reader configuration used by all modules (license: GPLv2 or LGPLv2.1) -More...

- - - - -

-Defines

#define USE_DYNAMIC_MEMORY
 Controls allocation of memory.
-

Detailed Description

-

Common sd-reader configuration used by all modules (license: GPLv2 or LGPLv2.1)

-
Note:
This file contains only configuration items relevant to all sd-reader implementation files. For module specific configuration options, please see the files fat_config.h, partition_config.h and sd_raw_config.h.
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/sd__raw_8c.html b/final_project/sd_reader/doc/html/sd__raw_8c.html deleted file mode 100644 index 03b1888..0000000 --- a/final_project/sd_reader/doc/html/sd__raw_8c.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - -sd-reader: sd_raw.c File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
sd_raw.c File Reference
-
-
- -

MMC/SD/SDHC raw access implementation (license: GPLv2 or LGPLv2.1) -More...

- - - - - - - - - - - - - - - - - - - - -

-Functions

uint8_t sd_raw_init ()
 Initializes memory card communication.
uint8_t sd_raw_available ()
 Checks wether a memory card is located in the slot.
uint8_t sd_raw_locked ()
 Checks wether the memory card is locked for write access.
uint8_t sd_raw_read (offset_t offset, uint8_t *buffer, uintptr_t length)
 Reads raw data from the card.
uint8_t sd_raw_read_interval (offset_t offset, uint8_t *buffer, uintptr_t interval, uintptr_t length, sd_raw_read_interval_handler_t callback, void *p)
 Continuously reads units of interval bytes and calls a callback function.
uint8_t sd_raw_write (offset_t offset, const uint8_t *buffer, uintptr_t length)
 Writes raw data to the card.
uint8_t sd_raw_write_interval (offset_t offset, uint8_t *buffer, uintptr_t length, sd_raw_write_interval_handler_t callback, void *p)
 Writes a continuous data stream obtained from a callback function.
uint8_t sd_raw_sync ()
 Writes the write buffer's content to the card.
uint8_t sd_raw_get_info (struct sd_raw_info *info)
 Reads informational data from the card.
-

Detailed Description

-

MMC/SD/SDHC raw access implementation (license: GPLv2 or LGPLv2.1)

-
Author:
Roland Riegel
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/sd__raw_8h.html b/final_project/sd_reader/doc/html/sd__raw_8h.html deleted file mode 100644 index 701d9d8..0000000 --- a/final_project/sd_reader/doc/html/sd__raw_8h.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - -sd-reader: sd_raw.h File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
sd_raw.h File Reference
-
-
- -

MMC/SD/SDHC raw access header (license: GPLv2 or LGPLv2.1) -More...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Structures

struct  sd_raw_info
 This struct is used by sd_raw_get_info() to return manufacturing and status information of the card. More...

-Defines

-#define SD_RAW_FORMAT_HARDDISK
 The card's layout is harddisk-like, which means it contains a master boot record with a partition table.
-#define SD_RAW_FORMAT_SUPERFLOPPY
 The card contains a single filesystem and no partition table.
-#define SD_RAW_FORMAT_UNIVERSAL
 The card's layout follows the Universal File Format.
-#define SD_RAW_FORMAT_UNKNOWN
 The card's layout is unknown.

-Functions

uint8_t sd_raw_init ()
 Initializes memory card communication.
uint8_t sd_raw_available ()
 Checks wether a memory card is located in the slot.
uint8_t sd_raw_locked ()
 Checks wether the memory card is locked for write access.
uint8_t sd_raw_read (offset_t offset, uint8_t *buffer, uintptr_t length)
 Reads raw data from the card.
uint8_t sd_raw_read_interval (offset_t offset, uint8_t *buffer, uintptr_t interval, uintptr_t length, sd_raw_read_interval_handler_t callback, void *p)
 Continuously reads units of interval bytes and calls a callback function.
uint8_t sd_raw_write (offset_t offset, const uint8_t *buffer, uintptr_t length)
 Writes raw data to the card.
uint8_t sd_raw_write_interval (offset_t offset, uint8_t *buffer, uintptr_t length, sd_raw_write_interval_handler_t callback, void *p)
 Writes a continuous data stream obtained from a callback function.
uint8_t sd_raw_sync ()
 Writes the write buffer's content to the card.
uint8_t sd_raw_get_info (struct sd_raw_info *info)
 Reads informational data from the card.
-

Detailed Description

-

MMC/SD/SDHC raw access header (license: GPLv2 or LGPLv2.1)

-
Author:
Roland Riegel
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/sd__raw__config_8h.html b/final_project/sd_reader/doc/html/sd__raw__config_8h.html deleted file mode 100644 index e382d00..0000000 --- a/final_project/sd_reader/doc/html/sd__raw__config_8h.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - -sd-reader: sd_raw_config.h File Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
sd_raw_config.h File Reference
-
-
- -

MMC/SD support configuration (license: GPLv2 or LGPLv2.1) -More...

- - - - - - - - - - - - -

-Defines

#define SD_RAW_WRITE_SUPPORT
 Controls MMC/SD write support.
#define SD_RAW_WRITE_BUFFERING
 Controls MMC/SD write buffering.
#define SD_RAW_SAVE_RAM
 Controls MMC/SD access buffering.
#define SD_RAW_SDHC
 Controls support for SDHC cards.
#define SD_RAW_SAVE_RAM
 Controls MMC/SD access buffering.
-

Detailed Description

-

MMC/SD support configuration (license: GPLv2 or LGPLv2.1)

-
- - - - - - diff --git a/final_project/sd_reader/doc/html/structfat__dir__entry__struct.html b/final_project/sd_reader/doc/html/structfat__dir__entry__struct.html deleted file mode 100644 index e659a70..0000000 --- a/final_project/sd_reader/doc/html/structfat__dir__entry__struct.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - -sd-reader: fat_dir_entry_struct Struct Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
fat_dir_entry_struct Struct Reference
-
-
- -

Describes a directory entry. - More...

- - - - - - - - - - - - -

-Data Fields

char long_name [32]
 The file's name, truncated to 31 characters.
uint8_t attributes
 The file's attributes.
cluster_t cluster
 The cluster in which the file's first byte resides.
uint32_t file_size
 The file's size.
offset_t entry_offset
 The total disk offset of this directory entry.
-

Detailed Description

-

Describes a directory entry.

-

Field Documentation

- -
- -
- -

The file's attributes.

-

Mask of the FAT_ATTRIB_* constants.

- -
-
- -
-
- - - - -
cluster_t fat_dir_entry_struct::cluster
-
-
- -

The cluster in which the file's first byte resides.

- -
-
- -
- -
- -

The total disk offset of this directory entry.

- -
-
- -
-
- - - - -
uint32_t fat_dir_entry_struct::file_size
-
-
- -

The file's size.

- -
-
- -
-
- - - - -
char fat_dir_entry_struct::long_name[32]
-
-
- -

The file's name, truncated to 31 characters.

- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/structpartition__struct.html b/final_project/sd_reader/doc/html/structpartition__struct.html deleted file mode 100644 index 06c8df2..0000000 --- a/final_project/sd_reader/doc/html/structpartition__struct.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - -sd-reader: partition_struct Struct Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
partition_struct Struct Reference
-
-
- -

Describes a partition. - More...

- - - - - - - - - - - - - - - - -

-Data Fields

device_read_t device_read
 The function which reads data from the partition.
device_read_interval_t device_read_interval
 The function which repeatedly reads a constant amount of data from the partition.
device_write_t device_write
 The function which writes data to the partition.
device_write_interval_t device_write_interval
 The function which repeatedly writes data to the partition.
uint8_t type
 The type of the partition.
-uint32_t offset
 The offset in blocks on the disk where this partition starts.
-uint32_t length
 The length in blocks of this partition.
-

Detailed Description

-

Describes a partition.

-

Field Documentation

- -
- -
- -

The function which reads data from the partition.

-
Note:
The offset given to this function is relative to the whole disk, not to the start of the partition.
- -
-
- -
- -
- -

The function which repeatedly reads a constant amount of data from the partition.

-
Note:
The offset given to this function is relative to the whole disk, not to the start of the partition.
- -
-
- -
- -
- -

The function which writes data to the partition.

-
Note:
The offset given to this function is relative to the whole disk, not to the start of the partition.
- -
-
- -
- -
- -

The function which repeatedly writes data to the partition.

-
Note:
The offset given to this function is relative to the whole disk, not to the start of the partition.
- -
-
- -
-
- - - - -
uint8_t partition_struct::type
-
-
- -

The type of the partition.

-

Compare this value to the PARTITION_TYPE_* constants.

- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/structsd__raw__info.html b/final_project/sd_reader/doc/html/structsd__raw__info.html deleted file mode 100644 index 014718b..0000000 --- a/final_project/sd_reader/doc/html/structsd__raw__info.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - -sd-reader: sd_raw_info Struct Reference - - - - - - - - -
- - -
- - - - - - - - - - - -
-
sd-reader - -
- -
-
- - - - -
-
- -
-
sd_raw_info Struct Reference
-
-
- -

This struct is used by sd_raw_get_info() to return manufacturing and status information of the card. - More...

- - - - - - - - - - - - - - - - - - - - - - - - - - -

-Data Fields

-uint8_t manufacturer
 A manufacturer code globally assigned by the SD card organization.
-uint8_t oem [3]
 A string describing the card's OEM or content, globally assigned by the SD card organization.
-uint8_t product [6]
 A product name.
uint8_t revision
 The card's revision, coded in packed BCD.
-uint32_t serial
 A serial number assigned by the manufacturer.
uint8_t manufacturing_year
 The year of manufacturing.
-uint8_t manufacturing_month
 The month of manufacturing.
-offset_t capacity
 The card's total capacity in bytes.
uint8_t flag_copy
 Defines wether the card's content is original or copied.
uint8_t flag_write_protect
 Defines wether the card's content is write-protected.
uint8_t flag_write_protect_temp
 Defines wether the card's content is temporarily write-protected.
uint8_t format
 The card's data layout.
-

Detailed Description

-

This struct is used by sd_raw_get_info() to return manufacturing and status information of the card.

-

Field Documentation

- -
-
- - - - -
uint8_t sd_raw_info::flag_copy
-
-
- -

Defines wether the card's content is original or copied.

-

A value of 0 means original, 1 means copied.

- -
-
- -
-
- - - - -
uint8_t sd_raw_info::flag_write_protect
-
-
- -

Defines wether the card's content is write-protected.

-
Note:
This is an internal flag and does not represent the state of the card's mechanical write-protect switch.
- -
-
- -
- -
- -

Defines wether the card's content is temporarily write-protected.

-
Note:
This is an internal flag and does not represent the state of the card's mechanical write-protect switch.
- -
-
- -
-
- - - - -
uint8_t sd_raw_info::format
-
-
- -

The card's data layout.

-

See the SD_RAW_FORMAT_* constants for details.

-
Note:
This value is not guaranteed to match reality.
- -
-
- -
-
- - - - -
uint8_t sd_raw_info::manufacturing_year
-
-
- -

The year of manufacturing.

-

A value of zero means year 2000.

- -
-
- -
-
- - - - -
uint8_t sd_raw_info::revision
-
-
- -

The card's revision, coded in packed BCD.

-

For example, the revision value 0x32 means "3.2".

- -
-
-
- - - - - - diff --git a/final_project/sd_reader/doc/html/tab_a.png b/final_project/sd_reader/doc/html/tab_a.png deleted file mode 100644 index 2d99ef2..0000000 Binary files a/final_project/sd_reader/doc/html/tab_a.png and /dev/null differ diff --git a/final_project/sd_reader/doc/html/tab_b.png b/final_project/sd_reader/doc/html/tab_b.png deleted file mode 100644 index b2c3d2b..0000000 Binary files a/final_project/sd_reader/doc/html/tab_b.png and /dev/null differ diff --git a/final_project/sd_reader/doc/html/tab_h.png b/final_project/sd_reader/doc/html/tab_h.png deleted file mode 100644 index c11f48f..0000000 Binary files a/final_project/sd_reader/doc/html/tab_h.png and /dev/null differ diff --git a/final_project/sd_reader/doc/html/tab_s.png b/final_project/sd_reader/doc/html/tab_s.png deleted file mode 100644 index 978943a..0000000 Binary files a/final_project/sd_reader/doc/html/tab_s.png and /dev/null differ diff --git a/final_project/sd_reader/doc/html/tabs.css b/final_project/sd_reader/doc/html/tabs.css deleted file mode 100644 index 2192056..0000000 --- a/final_project/sd_reader/doc/html/tabs.css +++ /dev/null @@ -1,59 +0,0 @@ -.tabs, .tabs2, .tabs3 { - background-image: url('tab_b.png'); - width: 100%; - z-index: 101; - font-size: 13px; -} - -.tabs2 { - font-size: 10px; -} -.tabs3 { - font-size: 9px; -} - -.tablist { - margin: 0; - padding: 0; - display: table; -} - -.tablist li { - float: left; - display: table-cell; - background-image: url('tab_b.png'); - line-height: 36px; - list-style: none; -} - -.tablist a { - display: block; - padding: 0 20px; - font-weight: bold; - background-image:url('tab_s.png'); - background-repeat:no-repeat; - background-position:right; - color: #283A5D; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; - outline: none; -} - -.tabs3 .tablist a { - padding: 0 10px; -} - -.tablist a:hover { - background-image: url('tab_h.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); - text-decoration: none; -} - -.tablist li.current a { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); -} diff --git a/final_project/sd_reader/main.c b/final_project/sd_reader/main.c index aa5124a..30a04d6 100644 --- a/final_project/sd_reader/main.c +++ b/final_project/sd_reader/main.c @@ -11,7 +11,18 @@ #define DEBUG 1 -#define MAX_SONG_NUM 9 +/* ---- Control Flow Variables ---- */ +// Commands +uint8_t cmd_depth = 0; +uint8_t cmd_state; + +// Song playing +// TODO fix this atrocious naming +uint16_t song_buf[2][SONG_BUF_LEN]; //! Buffers to play song from +uint8_t song_position; //! where we are in the buffers +bool song_buf_select; //! which buffer we're using +bool song_selected; //! Flag to say we just selected the song, read data in +int8_t song_selection = -1; //! ID of selected song typedef struct { @@ -23,6 +34,9 @@ song_info_t songs[MAX_SONG_NUM]; int main() { + gpio_init(); + timer_init(); + usart_init(); /* we will just use ordinary idle mode */ //set_sleep_mode(SLEEP_MODE_IDLE); @@ -75,7 +89,7 @@ int main() strcpy(songs[song_id].name, dir_entry.long_name); // Open file and keep info in songs - fat_open_file(fs, songs[song_id].fd); + fat_open_file(fs, (const struct fat_dir_entry_struct*) songs[song_id].fd); // Move on to reading next song song_id++; @@ -87,13 +101,69 @@ int main() while (1) { /// do stuff - uint8_t incoming_cmd; - if (fifo_pop(&incoming_cmd) == FIFO_SUCCESS) { - // Handle incoming command + // Handle incoming commands + if (cmd_depth == 0) { + if (fifo_pop(&cmd_state) == FIFO_SUCCESS) { + // Handle incoming command + switch(cmd_state) { + case (COMMS_CMD_PAUSE): + // Turn off interrupts for play timer to stop playing + TIFR0 &= ~(1 << OCF0A); + cmd_depth = 0; + break; + case (COMMS_CMD_PLAY): + // Turn on interrupts for play timer to start playing + TIFR0 |= (1 << OCF0A); + cmd_depth = 0; + break; + case (COMMS_CMD_SELECT_FILE): + // stop playing whatever song we have right now + // Wait for next loop to handle file + TIFR0 &= ~(1 << OCF0A); + cmd_depth = 1; + break; + case (COMMS_CMD_QUERY_NAME): + // Wait for next loop to handle file info + cmd_depth = 1; + break; + } + } } + if (cmd_depth == 1) { + uint8_t song_id; + if (fifo_pop(&song_id) == FIFO_SUCCESS) { + switch (cmd_state) { + case (COMMS_CMD_SELECT_FILE): + // select proper song and begin reading in + song_selection = song_id; + song_selected = 1; + break; + case (COMMS_CMD_QUERY_NAME): + // Just going to hope we can bump the UART baudrate up high enough + comms_reply_name(songs[song_id].name); + break; + } + } + } + // TODO check here if we are running into the end of our song buffer, and read in song data + if (song_position > 128 || song_selected) { + // Select opposite buffer + bool read_song_buf = !song_buf_select; + // Read in file + // 512 bytes to read, 256 samples + fat_read_file(songs[song_selection].fd, (uint8_t*) song_buf[read_song_buf], 512); + + // If we selected the song, make sure we start playing from the right buffer + if (song_selected) { + song_buf_select = read_song_buf; + } + + // Ensure we don't "re-select" the song + song_selected = false; + } } return 0; diff --git a/final_project/sd_reader/main.h b/final_project/sd_reader/main.h index 791db21..57cbfa9 100644 --- a/final_project/sd_reader/main.h +++ b/final_project/sd_reader/main.h @@ -3,6 +3,7 @@ #include #include +#include #include #include #include "fat.h" @@ -11,6 +12,16 @@ #include "sd_raw.h" #include "sd_raw_config.h" #include "fifo.h" +#include "comms.h" +#include "periph.h" +#define MAX_SONG_NUM 9 +#define SONG_BUF_LEN 256 // NO MORE THAN 256!!! + + +// Song playing +extern uint16_t song_buf[2][SONG_BUF_LEN]; //! Buffers to play song from +extern uint8_t song_position; //! where we are in the buffers +extern bool song_buf_select; //! which buffer we're using #endif \ No newline at end of file diff --git a/final_project/sd_reader/periph.c b/final_project/sd_reader/periph.c index 36b9620..e0a2f36 100644 --- a/final_project/sd_reader/periph.c +++ b/final_project/sd_reader/periph.c @@ -1,16 +1,91 @@ #include "main.h" #include +/** @brief intercepts incoming Serial commands + */ ISR(USART_RX_vect) { cli(); // Read byte into FIFO + fifo_push(UDR0); + // Flag is cleared by reading data from UDR sei(); } +/** @brief Interrupt handler for actually playing music + * + * Will only be called if the TIFR OCF0A flag is high, using that as our play/pause flag + * + * This may be possible to hand-optimise better, but I cut it down to ~40 instructions + * which should be fine at 16MHz + */ ISR(TIMER0_COMPA_vect) { cli(); // Handle music playing + /* DAC0 -> DAC5 are on PC0 -> PC5 + * Nothing relevent is on the rest of PORTC + * + * DAC6 -> DAC11 is PD2->PD7 + * + * DAC12 and DAC13 are PB0 and PB1 + */ + uint16_t in_data = song_buf[song_buf_select][song_position]; + // Split into 8 bit because we are using an 8 bit MCU, so code can be better + uint8_t data_lo = in_data; + uint8_t data_hi = in_data >> 8; + // DAC0 -> DAC5 + PORTC = (data_lo >> 2) & 0x3F; + // DAC6 -> DAC11 + PORTD &= 0x03; + PORTD |= data_hi << 2; + // DAC12 and DAC13 + PORTB &= 0xFC; // clear bits + PORTB |= data_hi >> 6; + + // Go to next sample + song_position++; + // Can just wrap if it's 8 bit sei(); +} + +void gpio_init() { + // Initialise all DAC outputs + /* DAC0 -> DAC5 are on PC0 -> PC5 + * Nothing relevent is on the rest of PORTC + * + * DAC6 -> DAC11 is PD2->PD7 + * + * DAC12 and DAC13 are PB0 and PB1 + */ + DDRC |= 0x3F; + DDRD |= 0xFC; + DDRC |= 0x03; +} + +void timer_init() { + // Compare outputs should be default, nothing + // Set to CTC, WGM = 0b010 + TCCR0A = (1 << OCIE0A); + + // Set timer to use clock input w/o prescaling + TCCR0B = 1; + + // 16 MHz / 44kHz = 182 clock cycles + // Pushing it for time, may have to move to 8 bit... + OCR0A = 182; + + // Don't enable the interrupt yet +} + +void usart_init() { + // set baudrate + UBRR0L = UBRR_VALUE & 255; + UBRR0H = UBRR_VALUE >> 8; + + // Set data info, no parity, 1 stop, 8-bit + UCSR0C |= (1 << UCSZ01) | (1 << UCSZ00); + + // Start it up + UCSR0B |= (1 << TXEN0) | (1 << RXEN0); } \ No newline at end of file diff --git a/final_project/sd_reader/periph.h b/final_project/sd_reader/periph.h new file mode 100644 index 0000000..30568f9 --- /dev/null +++ b/final_project/sd_reader/periph.h @@ -0,0 +1,13 @@ +#ifndef PERIPH_H_ +#define PERIPH_H_ + +#define USART_BAUDRATE 9600 //! USART baudrate, change this to set it. +#define UBRR_VALUE (((F_CPU/(USART_BAUDRATE*16UL)))-1) + +// TODO comments + +void gpio_init(); +void timer_init(); +void usart_init(); + +#endif \ No newline at end of file diff --git a/final_project/sd_reader/sd-reader.map b/final_project/sd_reader/sd-reader.map index b6967b8..000f7ca 100644 --- a/final_project/sd_reader/sd-reader.map +++ b/final_project/sd_reader/sd-reader.map @@ -7,7 +7,7 @@ Archive member included to satisfy reference by file (symbol) /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) fat.o (__udivmodsi4) /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) - /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o (exit) + /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o (exit) /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) sd_raw.o (__tablejump2__) /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) @@ -38,11 +38,27 @@ Archive member included to satisfy reference by file (symbol) fat.o (__cmpdi2_s8) /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) (__umulhisi3) +/usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(malloc.o) + main.o (malloc) /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strchr.o) fat.o (strchr) +/usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strcpy.o) + main.o (strcpy) /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strncmp.o) fat.o (strncmp) +Allocating common symbols +Common symbol size file + +cmd_state 0x1 main.o +song_buf 0x400 main.o +song_buf_select 0x1 main.o +__brkval 0x2 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(malloc.o) +song_selected 0x1 main.o +songs 0x24 main.o +song_position 0x1 main.o +__flp 0x2 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(malloc.o) + Memory Configuration Name Origin Length Attributes @@ -58,18 +74,19 @@ user_signatures 0x0000000000850000 0x0000000000000400 rw !x Linker script and memory map Address of section .data set to 0x800100 -LOAD /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o +LOAD /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o LOAD partition.o LOAD sd_raw.o LOAD byteordering.o -LOAD lcd.o +LOAD periph.o LOAD fat.o LOAD main.o +LOAD fifo.o START GROUP LOAD /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a LOAD /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libm.a LOAD /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a -LOAD /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libatmega168.a +LOAD /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libatmega328p.a END GROUP 0x0000000000020000 __TEXT_REGION_LENGTH__ = DEFINED (__TEXT_REGION_LENGTH__)?__TEXT_REGION_LENGTH__:0x20000 0x000000000000ffa0 __DATA_REGION_LENGTH__ = DEFINED (__DATA_REGION_LENGTH__)?__DATA_REGION_LENGTH__:0xffa0 @@ -169,9 +186,9 @@ END GROUP .rela.plt *(.rela.plt) -.text 0x0000000000000000 0x2502 +.text 0x0000000000000000 0x2884 *(.vectors) - .vectors 0x0000000000000000 0x68 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o + .vectors 0x0000000000000000 0x68 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o 0x0000000000000000 __vectors 0x0000000000000000 __vector_default *(.vectors) @@ -201,13 +218,13 @@ END GROUP SORT(*)(.ctors) SORT(*)(.dtors) *(.init0) - .init0 0x0000000000000086 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o + .init0 0x0000000000000086 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o 0x0000000000000086 __init *(.init0) *(.init1) *(.init1) *(.init2) - .init2 0x0000000000000086 0xc /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o + .init2 0x0000000000000086 0xc /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o *(.init2) *(.init3) *(.init3) @@ -226,10 +243,10 @@ END GROUP *(.init8) *(.init8) *(.init9) - .init9 0x00000000000000b8 0x8 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o + .init9 0x00000000000000b8 0x8 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o *(.init9) *(.text) - .text 0x00000000000000c0 0x4 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o + .text 0x00000000000000c0 0x4 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o 0x00000000000000c0 __vector_22 0x00000000000000c0 __vector_1 0x00000000000000c0 __vector_24 @@ -251,10 +268,8 @@ END GROUP 0x00000000000000c0 __vector_21 0x00000000000000c0 __vector_15 0x00000000000000c0 __vector_8 - 0x00000000000000c0 __vector_14 0x00000000000000c0 __vector_10 0x00000000000000c0 __vector_16 - 0x00000000000000c0 __vector_18 0x00000000000000c0 __vector_20 .text 0x00000000000000c4 0x144 partition.o 0x00000000000000c4 partition_open @@ -271,333 +286,341 @@ END GROUP 0x0000000000000a78 read32 0x0000000000000a84 write16 0x0000000000000a8c write32 - .text 0x0000000000000a98 0x1f8 lcd.o - 0x0000000000000b6a lcd_command - 0x0000000000000b7c lcd_data - 0x0000000000000b8e lcd_gotoxy - 0x0000000000000b9c lcd_getxy - 0x0000000000000ba4 lcd_clrscr - 0x0000000000000baa lcd_home - 0x0000000000000bb0 lcd_putc - 0x0000000000000bd8 lcd_puts - 0x0000000000000bf0 lcd_puts_p - 0x0000000000000c0e lcd_init - .text 0x0000000000000c90 0x14fa fat.o - 0x000000000000115a fat_open - 0x0000000000001610 fat_close - 0x000000000000161c fat_open_file - 0x0000000000001698 fat_close_file - 0x00000000000016a4 fat_read_file - 0x0000000000001a76 fat_seek_file - 0x0000000000001b06 fat_open_dir - 0x0000000000001b76 fat_close_dir - 0x0000000000001b82 fat_reset_dir - 0x0000000000001ba4 fat_read_dir - 0x0000000000001e6e fat_get_dir_entry_of_path - 0x0000000000001f80 fat_get_fs_size - 0x0000000000001fee fat_get_fs_free - .text 0x000000000000218a 0x0 main.o - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strchr.o) - .text 0x000000000000218a 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strncmp.o) - 0x000000000000218a . = ALIGN (0x2) + .text 0x0000000000000a98 0x120 periph.o + 0x0000000000000a98 __vector_18 + 0x0000000000000ae8 __vector_14 + 0x0000000000000b76 gpio_init + 0x0000000000000b8a timer_init + 0x0000000000000b98 usart_init + .text 0x0000000000000bb8 0x14fa fat.o + 0x0000000000001082 fat_open + 0x0000000000001538 fat_close + 0x0000000000001544 fat_open_file + 0x00000000000015c0 fat_close_file + 0x00000000000015cc fat_read_file + 0x000000000000199e fat_seek_file + 0x0000000000001a2e fat_open_dir + 0x0000000000001a9e fat_close_dir + 0x0000000000001aaa fat_reset_dir + 0x0000000000001acc fat_read_dir + 0x0000000000001d96 fat_get_dir_entry_of_path + 0x0000000000001ea8 fat_get_fs_size + 0x0000000000001f16 fat_get_fs_free + .text 0x00000000000020b2 0x0 main.o + .text 0x00000000000020b2 0xb6 fifo.o + 0x00000000000020b2 fifo_init + 0x00000000000020c4 fifo_pop + 0x0000000000002118 fifo_push + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(malloc.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strchr.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strcpy.o) + .text 0x0000000000002168 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strncmp.o) + 0x0000000000002168 . = ALIGN (0x2) *(.text.*) - .text.startup 0x000000000000218a 0x9a main.o - 0x000000000000218a main + .text.startup 0x0000000000002168 0x1ee main.o + 0x0000000000002168 main .text.libgcc.mul - 0x0000000000002224 0x20 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) - 0x0000000000002224 __mulsi3 + 0x0000000000002356 0x20 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) + 0x0000000000002356 __mulsi3 .text.libgcc.div - 0x0000000000002244 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) - .text.libgcc 0x0000000000002244 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) + 0x0000000000002376 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) + .text.libgcc 0x0000000000002376 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) .text.libgcc.prologue - 0x0000000000002244 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) + 0x0000000000002376 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) .text.libgcc.builtins - 0x0000000000002244 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) + 0x0000000000002376 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) .text.libgcc.fmul - 0x0000000000002244 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) + 0x0000000000002376 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) .text.libgcc.fixed - 0x0000000000002244 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) + 0x0000000000002376 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) .text.libgcc.mul - 0x0000000000002244 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) + 0x0000000000002376 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) .text.libgcc.div - 0x0000000000002244 0x28 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) - 0x0000000000002244 __udivmodhi4 - .text.libgcc 0x000000000000226c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) + 0x0000000000002376 0x28 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) + 0x0000000000002376 __udivmodhi4 + .text.libgcc 0x000000000000239e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) .text.libgcc.prologue - 0x000000000000226c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) + 0x000000000000239e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) .text.libgcc.builtins - 0x000000000000226c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) + 0x000000000000239e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) .text.libgcc.fmul - 0x000000000000226c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) + 0x000000000000239e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) .text.libgcc.fixed - 0x000000000000226c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) + 0x000000000000239e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) .text.libgcc.mul - 0x000000000000226c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) + 0x000000000000239e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) .text.libgcc.div - 0x000000000000226c 0x44 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) - 0x000000000000226c __udivmodsi4 - .text.libgcc 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) + 0x000000000000239e 0x44 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) + 0x000000000000239e __udivmodsi4 + .text.libgcc 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) .text.libgcc.prologue - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) .text.libgcc.builtins - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) .text.libgcc.fmul - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) .text.libgcc.fixed - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) .text.libgcc.mul - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) .text.libgcc.div - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) - .text.libgcc 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + .text.libgcc 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) .text.libgcc.prologue - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) .text.libgcc.builtins - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) .text.libgcc.fmul - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) .text.libgcc.fixed - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) .text.libgcc.mul - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) .text.libgcc.div - 0x00000000000022b0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) - .text.libgcc 0x00000000000022b0 0xc /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) - 0x00000000000022b0 __tablejump2__ + 0x00000000000023e2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) + .text.libgcc 0x00000000000023e2 0xc /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) + 0x00000000000023e2 __tablejump2__ .text.libgcc.prologue - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) .text.libgcc.builtins - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) .text.libgcc.fmul - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) .text.libgcc.fixed - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) .text.libgcc.mul - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) .text.libgcc.div - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) - .text.libgcc 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) + .text.libgcc 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) .text.libgcc.prologue - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) .text.libgcc.builtins - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) .text.libgcc.fmul - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) .text.libgcc.fixed - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) .text.libgcc.mul - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) .text.libgcc.div - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) - .text.libgcc 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) + .text.libgcc 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) .text.libgcc.prologue - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) .text.libgcc.builtins - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) .text.libgcc.fmul - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) .text.libgcc.fixed - 0x00000000000022bc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) + 0x00000000000023ee 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) .text.libgcc.mul - 0x00000000000022bc 0x16 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) - 0x00000000000022bc __muluhisi3 + 0x00000000000023ee 0x16 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) + 0x00000000000023ee __muluhisi3 .text.libgcc.div - 0x00000000000022d2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) - .text.libgcc 0x00000000000022d2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) + 0x0000000000002404 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) + .text.libgcc 0x0000000000002404 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) .text.libgcc.prologue - 0x00000000000022d2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) + 0x0000000000002404 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) .text.libgcc.builtins - 0x00000000000022d2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) + 0x0000000000002404 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) .text.libgcc.fmul - 0x00000000000022d2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) + 0x0000000000002404 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) .text.libgcc.fixed - 0x00000000000022d2 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) + 0x0000000000002404 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) .text.libgcc.mul - 0x00000000000022d2 0xa0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) - 0x00000000000022d2 __muldi3 + 0x0000000000002404 0xa0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) + 0x0000000000002404 __muldi3 .text.libgcc.div - 0x0000000000002372 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) - .text.libgcc 0x0000000000002372 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) + 0x00000000000024a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) + .text.libgcc 0x00000000000024a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) .text.libgcc.prologue - 0x0000000000002372 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) + 0x00000000000024a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) .text.libgcc.builtins - 0x0000000000002372 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) + 0x00000000000024a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) .text.libgcc.fmul - 0x0000000000002372 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) + 0x00000000000024a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) .text.libgcc.fixed - 0x0000000000002372 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) + 0x00000000000024a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) .text.libgcc.mul - 0x0000000000002372 0x12 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) - 0x0000000000002372 __muldi3_6 + 0x00000000000024a4 0x12 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) + 0x00000000000024a4 __muldi3_6 .text.libgcc.div - 0x0000000000002384 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) - .text.libgcc 0x0000000000002384 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) + 0x00000000000024b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) + .text.libgcc 0x00000000000024b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) .text.libgcc.prologue - 0x0000000000002384 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) + 0x00000000000024b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) .text.libgcc.builtins - 0x0000000000002384 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) + 0x00000000000024b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) .text.libgcc.fmul - 0x0000000000002384 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) + 0x00000000000024b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) .text.libgcc.fixed - 0x0000000000002384 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) + 0x00000000000024b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) .text.libgcc.mul - 0x0000000000002384 0x56 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) - 0x0000000000002384 __umulsidi3 - 0x0000000000002386 __umulsidi3_helper + 0x00000000000024b6 0x56 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) + 0x00000000000024b6 __umulsidi3 + 0x00000000000024b8 __umulsidi3_helper .text.libgcc.div - 0x00000000000023da 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) - .text.libgcc 0x00000000000023da 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) + 0x000000000000250c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) + .text.libgcc 0x000000000000250c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) .text.libgcc.prologue - 0x00000000000023da 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) + 0x000000000000250c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) .text.libgcc.builtins - 0x00000000000023da 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) + 0x000000000000250c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) .text.libgcc.fmul - 0x00000000000023da 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) + 0x000000000000250c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) .text.libgcc.fixed - 0x00000000000023da 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) + 0x000000000000250c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) .text.libgcc.mul - 0x00000000000023da 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) + 0x000000000000250c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) .text.libgcc.div - 0x00000000000023da 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) - .text.libgcc 0x00000000000023da 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) + 0x000000000000250c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) + .text.libgcc 0x000000000000250c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) .text.libgcc.prologue - 0x00000000000023da 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) + 0x000000000000250c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) .text.libgcc.builtins - 0x00000000000023da 0x32 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) - 0x00000000000023da __ashldi3 + 0x000000000000250c 0x32 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) + 0x000000000000250c __ashldi3 .text.libgcc.fmul - 0x000000000000240c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) + 0x000000000000253e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) .text.libgcc.fixed - 0x000000000000240c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) + 0x000000000000253e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) .text.libgcc.mul - 0x000000000000240c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) + 0x000000000000253e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) .text.libgcc.div - 0x000000000000240c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) - .text.libgcc 0x000000000000240c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) + 0x000000000000253e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) + .text.libgcc 0x000000000000253e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) .text.libgcc.prologue - 0x000000000000240c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) + 0x000000000000253e 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) .text.libgcc.builtins - 0x000000000000240c 0x3c /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) - 0x000000000000240c __ashrdi3 - 0x0000000000002410 __lshrdi3 + 0x000000000000253e 0x3c /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) + 0x000000000000253e __ashrdi3 + 0x0000000000002542 __lshrdi3 .text.libgcc.fmul - 0x0000000000002448 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) + 0x000000000000257a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) .text.libgcc.fixed - 0x0000000000002448 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) + 0x000000000000257a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) .text.libgcc.mul - 0x0000000000002448 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) + 0x000000000000257a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) .text.libgcc.div - 0x0000000000002448 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) - .text.libgcc 0x0000000000002448 0x12 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) - 0x0000000000002448 __adddi3 + 0x000000000000257a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) + .text.libgcc 0x000000000000257a 0x12 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) + 0x000000000000257a __adddi3 .text.libgcc.prologue - 0x000000000000245a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) + 0x000000000000258c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) .text.libgcc.builtins - 0x000000000000245a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) + 0x000000000000258c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) .text.libgcc.fmul - 0x000000000000245a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) + 0x000000000000258c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) .text.libgcc.fixed - 0x000000000000245a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) + 0x000000000000258c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) .text.libgcc.mul - 0x000000000000245a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) + 0x000000000000258c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) .text.libgcc.div - 0x000000000000245a 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) - .text.libgcc 0x000000000000245a 0x18 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) - 0x000000000000245a __adddi3_s8 + 0x000000000000258c 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) + .text.libgcc 0x000000000000258c 0x18 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) + 0x000000000000258c __adddi3_s8 .text.libgcc.prologue - 0x0000000000002472 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) + 0x00000000000025a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) .text.libgcc.builtins - 0x0000000000002472 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) + 0x00000000000025a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) .text.libgcc.fmul - 0x0000000000002472 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) + 0x00000000000025a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) .text.libgcc.fixed - 0x0000000000002472 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) + 0x00000000000025a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) .text.libgcc.mul - 0x0000000000002472 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) + 0x00000000000025a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) .text.libgcc.div - 0x0000000000002472 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) - .text.libgcc 0x0000000000002472 0x12 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) - 0x0000000000002472 __subdi3 + 0x00000000000025a4 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) + .text.libgcc 0x00000000000025a4 0x12 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) + 0x00000000000025a4 __subdi3 .text.libgcc.prologue - 0x0000000000002484 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) + 0x00000000000025b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) .text.libgcc.builtins - 0x0000000000002484 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) + 0x00000000000025b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) .text.libgcc.fmul - 0x0000000000002484 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) + 0x00000000000025b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) .text.libgcc.fixed - 0x0000000000002484 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) + 0x00000000000025b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) .text.libgcc.mul - 0x0000000000002484 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) + 0x00000000000025b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) .text.libgcc.div - 0x0000000000002484 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) - .text.libgcc 0x0000000000002484 0x12 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) - 0x0000000000002484 __cmpdi2 + 0x00000000000025b6 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) + .text.libgcc 0x00000000000025b6 0x12 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) + 0x00000000000025b6 __cmpdi2 .text.libgcc.prologue - 0x0000000000002496 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) + 0x00000000000025c8 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) .text.libgcc.builtins - 0x0000000000002496 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) + 0x00000000000025c8 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) .text.libgcc.fmul - 0x0000000000002496 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) + 0x00000000000025c8 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) .text.libgcc.fixed - 0x0000000000002496 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) + 0x00000000000025c8 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) .text.libgcc.mul - 0x0000000000002496 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) + 0x00000000000025c8 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) .text.libgcc.div - 0x0000000000002496 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) - .text.libgcc 0x0000000000002496 0x18 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) - 0x0000000000002496 __cmpdi2_s8 + 0x00000000000025c8 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) + .text.libgcc 0x00000000000025c8 0x18 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) + 0x00000000000025c8 __cmpdi2_s8 .text.libgcc.prologue - 0x00000000000024ae 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) + 0x00000000000025e0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) .text.libgcc.builtins - 0x00000000000024ae 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) + 0x00000000000025e0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) .text.libgcc.fmul - 0x00000000000024ae 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) + 0x00000000000025e0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) .text.libgcc.fixed - 0x00000000000024ae 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) + 0x00000000000025e0 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) .text.libgcc.mul - 0x00000000000024ae 0x1e /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) - 0x00000000000024ae __umulhisi3 + 0x00000000000025e0 0x1e /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) + 0x00000000000025e0 __umulhisi3 .text.libgcc.div - 0x00000000000024cc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) - .text.libgcc 0x00000000000024cc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) + 0x00000000000025fe 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) + .text.libgcc 0x00000000000025fe 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) .text.libgcc.prologue - 0x00000000000024cc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) + 0x00000000000025fe 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) .text.libgcc.builtins - 0x00000000000024cc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) + 0x00000000000025fe 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) .text.libgcc.fmul - 0x00000000000024cc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) + 0x00000000000025fe 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) .text.libgcc.fixed - 0x00000000000024cc 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) + 0x00000000000025fe 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) .text.avr-libc - 0x00000000000024cc 0x16 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strchr.o) - 0x00000000000024cc strchr + 0x00000000000025fe 0x242 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(malloc.o) + 0x00000000000025fe malloc + 0x000000000000272e free .text.avr-libc - 0x00000000000024e2 0x1c /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strncmp.o) - 0x00000000000024e2 strncmp - 0x00000000000024fe . = ALIGN (0x2) + 0x0000000000002840 0x16 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strchr.o) + 0x0000000000002840 strchr + .text.avr-libc + 0x0000000000002856 0xe /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strcpy.o) + 0x0000000000002856 strcpy + .text.avr-libc + 0x0000000000002864 0x1c /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strncmp.o) + 0x0000000000002864 strncmp + 0x0000000000002880 . = ALIGN (0x2) *(.fini9) - .fini9 0x00000000000024fe 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) - 0x00000000000024fe exit - 0x00000000000024fe _exit + .fini9 0x0000000000002880 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + 0x0000000000002880 exit + 0x0000000000002880 _exit *(.fini9) *(.fini8) *(.fini8) @@ -616,96 +639,116 @@ END GROUP *(.fini1) *(.fini1) *(.fini0) - .fini0 0x00000000000024fe 0x4 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + .fini0 0x0000000000002880 0x4 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) *(.fini0) - 0x0000000000002502 _etext = . + 0x0000000000002884 _etext = . -.data 0x0000000000800100 0x10 load address 0x0000000000002502 +.data 0x0000000000800100 0x16 load address 0x0000000000002884 0x0000000000800100 PROVIDE (__data_start, .) *(.data) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o + .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o .data 0x0000000000800100 0x0 partition.o .data 0x0000000000800100 0x0 sd_raw.o .data 0x0000000000800100 0x0 byteordering.o - .data 0x0000000000800100 0x0 lcd.o + .data 0x0000000000800100 0x0 periph.o .data 0x0000000000800100 0x0 fat.o - .data 0x0000000000800100 0x0 main.o - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strchr.o) - .data 0x0000000000800100 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strncmp.o) + .data 0x0000000000800100 0x1 main.o + 0x0000000000800100 song_selection + .data 0x0000000000800101 0x0 fifo.o + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) + .data 0x0000000000800101 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) + .data 0x0000000000800101 0x6 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(malloc.o) + 0x0000000000800101 __malloc_heap_end + 0x0000000000800103 __malloc_heap_start + 0x0000000000800105 __malloc_margin + .data 0x0000000000800107 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strchr.o) + .data 0x0000000000800107 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strcpy.o) + .data 0x0000000000800107 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strncmp.o) *(.data*) *(.rodata) - .rodata 0x0000000000800100 0xd fat.o + .rodata 0x0000000000800107 0xd fat.o *(.rodata*) .rodata.str1.1 - 0x000000000080010d 0x2 main.o + 0x0000000000800114 0x2 main.o *(.gnu.linkonce.d*) - 0x0000000000800110 . = ALIGN (0x2) - *fill* 0x000000000080010f 0x1 - 0x0000000000800110 _edata = . - 0x0000000000800110 PROVIDE (__data_end, .) + 0x0000000000800116 . = ALIGN (0x2) + 0x0000000000800116 _edata = . + 0x0000000000800116 PROVIDE (__data_end, .) -.bss 0x0000000000800110 0xf5 - 0x0000000000800110 PROVIDE (__bss_start, .) +.bss 0x0000000000800116 0x53c + 0x0000000000800116 PROVIDE (__bss_start, .) *(.bss) - .bss 0x0000000000800110 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o - .bss 0x0000000000800110 0x11 partition.o - .bss 0x0000000000800121 0x1 sd_raw.o - .bss 0x0000000000800122 0x0 byteordering.o - .bss 0x0000000000800122 0x0 lcd.o - .bss 0x0000000000800122 0xe3 fat.o - .bss 0x0000000000800205 0x0 main.o - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strchr.o) - .bss 0x0000000000800205 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strncmp.o) + .bss 0x0000000000800116 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o + .bss 0x0000000000800116 0x11 partition.o + .bss 0x0000000000800127 0x1 sd_raw.o + .bss 0x0000000000800128 0x0 byteordering.o + .bss 0x0000000000800128 0x0 periph.o + .bss 0x0000000000800128 0xe3 fat.o + .bss 0x000000000080020b 0x1 main.o + 0x000000000080020b cmd_depth + .bss 0x000000000080020c 0x1a fifo.o + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_mulsi3.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodhi4.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_udivmodsi4.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_exit.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_tablejump2.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_copy_data.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_clear_bss.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muluhisi3.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_muldi3_6.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulsidi3.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashldi3.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_ashrdi3.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_adddi3_s8.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_subdi3.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_cmpdi2_s8.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/avr5/libgcc.a(_umulhisi3.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(malloc.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strchr.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strcpy.o) + .bss 0x0000000000800226 0x0 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(strncmp.o) *(.bss*) *(COMMON) - 0x0000000000800205 PROVIDE (__bss_end, .) - 0x0000000000002502 __data_load_start = LOADADDR (.data) - 0x0000000000002512 __data_load_end = (__data_load_start + SIZEOF (.data)) + COMMON 0x0000000000800226 0x428 main.o + 0x0000000000800226 cmd_state + 0x0000000000800227 song_buf + 0x0000000000800627 song_buf_select + 0x0000000000800628 song_selected + 0x0000000000800629 songs + 0x000000000080064d song_position + COMMON 0x000000000080064e 0x4 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(malloc.o) + 0x000000000080064e __brkval + 0x0000000000800650 __flp + 0x0000000000800652 PROVIDE (__bss_end, .) + 0x0000000000002884 __data_load_start = LOADADDR (.data) + 0x000000000000289a __data_load_end = (__data_load_start + SIZEOF (.data)) -.noinit 0x0000000000800205 0x0 +.noinit 0x0000000000800652 0x0 [!provide] PROVIDE (__noinit_start, .) *(.noinit*) [!provide] PROVIDE (__noinit_end, .) - 0x0000000000800205 _end = . - [!provide] PROVIDE (__heap_start, .) + 0x0000000000800652 _end = . + 0x0000000000800652 PROVIDE (__heap_start, .) .eeprom 0x0000000000810000 0x0 *(.eeprom*) @@ -726,23 +769,25 @@ END GROUP .user_signatures *(.user_signatures*) -.stab 0x0000000000000000 0x4b3c +.stab 0x0000000000000000 0x4ab8 *(.stab) .stab 0x0000000000000000 0x6e4 partition.o .stab 0x00000000000006e4 0x129c sd_raw.o 0x144c (size before relaxing) .stab 0x0000000000001980 0x414 byteordering.o 0x594 (size before relaxing) - .stab 0x0000000000001d94 0xe34 lcd.o - 0x1008 (size before relaxing) - .stab 0x0000000000002bc8 0x1b0c fat.o + .stab 0x0000000000001d94 0x69c periph.o + 0x8f4 (size before relaxing) + .stab 0x0000000000002430 0x1adc fat.o 0x1d28 (size before relaxing) - .stab 0x00000000000046d4 0x468 main.o - 0x6fc (size before relaxing) + .stab 0x0000000000003f0c 0x750 main.o + 0xab0 (size before relaxing) + .stab 0x000000000000465c 0x45c fifo.o + 0x5f4 (size before relaxing) -.stabstr 0x0000000000000000 0x2390 +.stabstr 0x0000000000000000 0x2638 *(.stabstr) - .stabstr 0x0000000000000000 0x2390 partition.o + .stabstr 0x0000000000000000 0x2638 partition.o .stab.excl *(.stab.excl) @@ -762,14 +807,16 @@ END GROUP 0x12 (size before relaxing) .comment 0x0000000000000011 0x12 sd_raw.o .comment 0x0000000000000011 0x12 byteordering.o - .comment 0x0000000000000011 0x12 lcd.o + .comment 0x0000000000000011 0x12 periph.o .comment 0x0000000000000011 0x12 fat.o .comment 0x0000000000000011 0x12 main.o + .comment 0x0000000000000011 0x12 fifo.o + .comment 0x0000000000000011 0x12 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/libc.a(malloc.o) .note.gnu.avr.deviceinfo - 0x0000000000000000 0x3c + 0x0000000000000000 0x40 .note.gnu.avr.deviceinfo - 0x0000000000000000 0x3c /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o + 0x0000000000000000 0x40 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o .note.gnu.build-id *(.note.gnu.build-id) @@ -794,22 +841,22 @@ END GROUP .debug_info 0x0000000000000000 0x5f4 *(.debug_info .gnu.linkonce.wi.*) - .debug_info 0x0000000000000000 0x5f4 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o + .debug_info 0x0000000000000000 0x5f4 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o .debug_abbrev 0x0000000000000000 0x5a2 *(.debug_abbrev) - .debug_abbrev 0x0000000000000000 0x5a2 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o + .debug_abbrev 0x0000000000000000 0x5a2 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o .debug_line 0x0000000000000000 0x1a *(.debug_line .debug_line.* .debug_line_end) - .debug_line 0x0000000000000000 0x1a /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o + .debug_line 0x0000000000000000 0x1a /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o .debug_frame *(.debug_frame) .debug_str 0x0000000000000000 0x208 *(.debug_str) - .debug_str 0x0000000000000000 0x208 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega168.o + .debug_str 0x0000000000000000 0x208 /usr/lib/gcc/avr/5.4.0/../../../avr/lib/avr5/crtatmega328p.o .debug_loc *(.debug_loc) diff --git a/final_project/sd_reader/sd-reader.out b/final_project/sd_reader/sd-reader.out index 1a3736e..c550b5b 100755 Binary files a/final_project/sd_reader/sd-reader.out and b/final_project/sd_reader/sd-reader.out differ