Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: mphalport.c
- Revision:
- 7:379d46fd02c2
- Parent:
- 0:5868e8752d44
--- a/mphalport.c Mon Apr 25 19:55:21 2016 +0100
+++ b/mphalport.c Tue Apr 26 22:50:06 2016 +0100
@@ -35,20 +35,21 @@
#include "py/lexer.h"
// Since we have no filesystem, no file exists
-mp_import_stat_t mp_import_stat(const char *path)
-{
- (void)path;
- return MP_IMPORT_STAT_NO_EXIST;
+mp_import_stat_t mp_import_stat(const char *path) {
+ (void)path;
+ return MP_IMPORT_STAT_NO_EXIST;
}
-mp_lexer_t *mp_lexer_new_from_file(const char *filename)
-{
- (void)filename;
- return NULL;
+mp_lexer_t *mp_lexer_new_from_file(const char *filename) {
+ (void)filename;
+ return NULL;
}
mp_obj_t mp_builtin_open(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) {
- return mp_const_none;
+ (void)n_args;
+ (void)args;
+ (void)kwargs;
+ return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_KW(mp_builtin_open_obj, 1, mp_builtin_open);
@@ -56,27 +57,27 @@
// Text output
void mp_hal_stdout_tx_strn(const char *str, size_t len) {
- while (len--) {
- mp_hal_stdout_tx_chr(*str++);
- }
+ while (len--) {
+ mp_hal_stdout_tx_chr(*str++);
+ }
}
void mp_hal_stdout_tx_strn_cooked(const char *str, size_t len) {
- while (len--) {
- char c = *str++;
- if (c == '\n') {
- mp_hal_stdout_tx_chr('\r');
+ while (len--) {
+ char c = *str++;
+ if (c == '\n') {
+ mp_hal_stdout_tx_chr('\r');
+ }
+ mp_hal_stdout_tx_chr(c);
}
- mp_hal_stdout_tx_chr(c);
- }
}
void mp_hal_stdout_tx_str(const char *str) {
mp_hal_stdout_tx_strn(str, strlen(str));
}
-void mp_hal_set_interrupt_char(int c)
-{
+void mp_hal_set_interrupt_char(int c) {
+ (void)c;
}
mp_uint_t mp_hal_ticks_ms(void) {
@@ -84,6 +85,7 @@
}
void mp_hal_delay_ms(mp_uint_t ms) {
+ (void)ms;
}
void gc_collect(void) {}