-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade picoruby && add io_rp2040.{h|c}
- Loading branch information
Showing
4 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#ifndef IO_RP2040_DEFINED_H_ | ||
#define IO_RP2040_DEFINED_H_ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
void mrbc_io_rp2040_init(void); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* IO_RP2040_DEFINED_H_ */ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <stdlib.h> | ||
|
||
#include <mrubyc.h> | ||
|
||
#include "../lib/picoruby/mrbgems/picoruby-io-console/src/hal/hal.h" | ||
|
||
void | ||
c_raw_bang(mrb_vm *vm, mrb_value *v, int argc) | ||
{ | ||
// TODO | ||
SET_RETURN(v[0]); | ||
} | ||
|
||
void | ||
c_cooked_bang(mrb_vm *vm, mrb_value *v, int argc) | ||
{ | ||
// TODO | ||
SET_RETURN(v[0]); | ||
} | ||
|
||
void | ||
mrbc_io_rp2040_init(void) | ||
{ | ||
mrbc_class *class_IO = mrbc_define_class(0, "IO", mrbc_class_object); | ||
mrbc_define_method(0, class_IO, "raw!", c_raw_bang); | ||
mrbc_define_method(0, class_IO, "cooked!", c_cooked_bang); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters