Skip to content

Commit

Permalink
Merge pull request #12 from hepingood/dev
Browse files Browse the repository at this point in the history
style: fix some syntax errors
  • Loading branch information
libdriver authored Feb 5, 2023
2 parents 50cf883 + d4bae4a commit 4128712
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion doc/html/driver__at24cxx_8c_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@
<div class="line"><a name="l00472"></a><span class="lineno"> 472</span>&#160; info-&gt;<a class="code" href="structat24cxx__info__s.html#a9db82802561bf22d799b03a345f1d1dc">max_current_ma</a> = <a class="code" href="driver__at24cxx_8c.html#a2989837a37d6d63b59c6dd541b785435">MAX_CURRENT</a>; <span class="comment">/* set maximum current */</span></div>
<div class="line"><a name="l00473"></a><span class="lineno"> 473</span>&#160; info-&gt;<a class="code" href="structat24cxx__info__s.html#a3366a5dce9b829e03c3d321c2b4df3f6">temperature_max</a> = <a class="code" href="driver__at24cxx_8c.html#a90c0b20d54005712fcc8cb01281360e9">TEMPERATURE_MAX</a>; <span class="comment">/* set minimal temperature */</span></div>
<div class="line"><a name="l00474"></a><span class="lineno"> 474</span>&#160; info-&gt;<a class="code" href="structat24cxx__info__s.html#a8f9dbe66ac0b66ebae0a36fcb4ba368e">temperature_min</a> = <a class="code" href="driver__at24cxx_8c.html#aab353db5bf4eb787f86a2080f609a551">TEMPERATURE_MIN</a>; <span class="comment">/* set maximum temperature */</span></div>
<div class="line"><a name="l00475"></a><span class="lineno"> 475</span>&#160; info-&gt;<a class="code" href="structat24cxx__info__s.html#a41b0bd442708b70d252c50b92c75265a">driver_version</a> = <a class="code" href="driver__at24cxx_8c.html#ae578001fe043b4cca7a0edd801cfe9c4">DRIVER_VERSION</a>; <span class="comment">/* set driver verison */</span></div>
<div class="line"><a name="l00475"></a><span class="lineno"> 475</span>&#160; info-&gt;<a class="code" href="structat24cxx__info__s.html#a41b0bd442708b70d252c50b92c75265a">driver_version</a> = <a class="code" href="driver__at24cxx_8c.html#ae578001fe043b4cca7a0edd801cfe9c4">DRIVER_VERSION</a>; <span class="comment">/* set driver version */</span></div>
<div class="line"><a name="l00476"></a><span class="lineno"> 476</span>&#160; </div>
<div class="line"><a name="l00477"></a><span class="lineno"> 477</span>&#160; <span class="keywordflow">return</span> 0; <span class="comment">/* success return 0 */</span></div>
<div class="line"><a name="l00478"></a><span class="lineno"> 478</span>&#160;}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#define IIC_DEVICE_NAME "/dev/i2c-1" /**< iic device name */

/**
* @brief iic device hanble definition
* @brief iic device handle definition
*/
static int gs_fd; /**< iic handle */

Expand Down
4 changes: 2 additions & 2 deletions project/raspberrypi4b/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ uint8_t at24cxx(uint8_t argc, char **argv)
{"type", required_argument, NULL, 4},
{NULL, 0, NULL, 0},
};
char type[33] = "unknow";
char type[33] = "unknown";
uint8_t data = rand() % 0xFF;
uint16_t reg = 0x0000;
at24cxx_t chip_type = AT24C01;
Expand Down Expand Up @@ -534,7 +534,7 @@ int main(uint8_t argc, char **argv)
}
else
{
at24cxx_interface_debug_print("at24cxx: unknow status code.\n");
at24cxx_interface_debug_print("at24cxx: unknown status code.\n");
}

return 0;
Expand Down
8 changes: 4 additions & 4 deletions project/stm32f407/EW/stm32f407.dep
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<configuration>
<name>Release</name>
<outputs>
<file>$PROJ_DIR$\..\usr\src\main.c</file>
<file>$PROJ_DIR$\..\usr\src\shell.c</file>
<file>$PROJ_DIR$\..\usr\src\getopt.c</file>
<file>$PROJ_DIR$\..\usr\src\stm32f4xx_hal_msp.c</file>
<file>$PROJ_DIR$\..\usr\src\system_stm32f4xx.c</file>
<file>$PROJ_DIR$\..\usr\src\stm32f4xx_it.c</file>
<file>$PROJ_DIR$\..\usr\src\system_stm32f4xx.c</file>
<file>$PROJ_DIR$\..\usr\src\main.c</file>
<file>$PROJ_DIR$\..\usr\src\getopt.c</file>
<file>$PROJ_DIR$\..\usr\src\shell.c</file>
</outputs>
<forcedrebuild>
<name>[REBUILD_ALL]</name>
Expand Down
8 changes: 4 additions & 4 deletions project/stm32f407/usr/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ uint8_t at24cxx(uint8_t argc, char **argv)
{"type", required_argument, NULL, 4},
{NULL, 0, NULL, 0},
};
char type[32] = "unknow";
char type[32] = "unknown";
uint8_t data = rand() % 0xFF;
uint16_t reg = 0x0000;
at24cxx_t chip_type = AT24C01;
Expand Down Expand Up @@ -534,7 +534,7 @@ int main(void)
/* uart init */
uart_init(115200);

/* shell init && register at24cxx fuction */
/* shell init && register at24cxx function */
shell_init();
shell_register("at24cxx", at24cxx);
uart_print("at24cxx: welcome to libdriver at24cxx.\n");
Expand All @@ -557,7 +557,7 @@ int main(void)
}
else if (res == 2)
{
uart_print("at24cxx: unknow command.\n");
uart_print("at24cxx: unknown command.\n");
}
else if (res == 3)
{
Expand All @@ -573,7 +573,7 @@ int main(void)
}
else
{
uart_print("at24cxx: unknow status code.\n");
uart_print("at24cxx: unknown status code.\n");
}
uart_flush();
}
Expand Down
2 changes: 1 addition & 1 deletion src/driver_at24cxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ uint8_t at24cxx_info(at24cxx_info_t *info)
info->max_current_ma = MAX_CURRENT; /* set maximum current */
info->temperature_max = TEMPERATURE_MAX; /* set minimal temperature */
info->temperature_min = TEMPERATURE_MIN; /* set maximum temperature */
info->driver_version = DRIVER_VERSION; /* set driver verison */
info->driver_version = DRIVER_VERSION; /* set driver version */

return 0; /* success return 0 */
}

0 comments on commit 4128712

Please sign in to comment.