Skip to content

Commit

Permalink
ps2pico-2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
No0ne committed Feb 21, 2024
1 parent 0855883 commit c5df795
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
21 changes: 11 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@ project(ps2pico C CXX ASM)
# Initialise the Raspberry Pi Pico SDK
pico_sdk_init()

##add_compile_definitions(ATPHY)
##add_executable(ps2pico src/ps2pico.c src/atphy.c)
add_compile_definitions(ATPHY)
add_executable(ps2pico src/ps2pico.c src/atphy.c)

##add_compile_definitions(XTPHY)
##add_executable(ps2pico src/ps2pico.c src/xtphy.c)

##add_compile_definitions(CLOCKIN=14)
##add_compile_definitions(CLOCKOUT=15)
##add_compile_definitions(DATAOUT=16)
##add_compile_definitions(DATAIN=17)
add_compile_definitions(CLOCKIN=14)
add_compile_definitions(CLOCKOUT=15)
add_compile_definitions(DATAOUT=16)
add_compile_definitions(DATAIN=17)

add_compile_definitions(XTALT)
add_executable(ps2pico src/ps2pico.c src/xtphy.c)
add_compile_definitions(DATAALT=11)
add_compile_definitions(CLOCKALT=12)
##add_compile_definitions(XTALT)
##add_executable(ps2pico src/ps2pico.c src/xtphy.c)
##add_compile_definitions(DATAALT=11)
##add_compile_definitions(CLOCKALT=12)
##add_compile_definitions(LVPWR=13)

pico_generate_pio_header(ps2pico ${CMAKE_CURRENT_LIST_DIR}/src/atphy.pio)
pico_generate_pio_header(ps2pico ${CMAKE_CURRENT_LIST_DIR}/src/xtphy.pio)
Expand Down
2 changes: 1 addition & 1 deletion src/ps2pico.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void main() {
printf("XT version\n");
#endif
#ifdef XTALT
printf("XT ps2x2pico alt-version\n");
printf("XT ps2x2pico version\n");
#endif

while(1) {
Expand Down
3 changes: 3 additions & 0 deletions src/xtphy.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ void kb_init() {
xtphy_program_init(pio0, 0, pio_add_program(pio0, &xtphy_program));
#endif
#ifdef XTALT
gpio_init(LVPWR);
gpio_set_dir(LVPWR, GPIO_OUT);
gpio_put(LVPWR, 1);
xtalt_program_init(pio0, 0, pio_add_program(pio0, &xtalt_program));
#endif
add_alarm_in_ms(1000, reset_detect, NULL, false);
Expand Down

5 comments on commit c5df795

@tenij000
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can make version that works whit arduino uno ?

@No0ne
Copy link
Owner Author

@No0ne No0ne commented on c5df795 May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, not possible. Arduino Uno is based on the ATmega328 microcontroller which does not have any USB support.

@tenij000
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pico
do conect it like this ? only 2 wires

@No0ne
Copy link
Owner Author

@No0ne No0ne commented on c5df795 May 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please look at #4 (comment)

@tenij000
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found it thx

Please sign in to comment.