├── .devcontainer
├── Dockerfile
└── devcontainer.json
├── .github
└── workflows
│ ├── build.yml
│ └── gh-pages.yml
├── .gitignore
├── .gitmodules
├── Doxyfile
├── LICENSE.md
├── PCB
├── Main Boards
│ ├── OSO-SWAT-A1
│ │ ├── OSO-SWAT-A1-05-BLUE.brd
│ │ ├── OSO-SWAT-A1-05-BLUE.sch
│ │ ├── OSO-SWAT-A1-05-BLUE_2021-09-20.zip
│ │ ├── OSO-SWAT-A1-05.brd
│ │ └── OSO-SWAT-A1-05.sch
│ ├── OSO-SWAT-B1
│ │ ├── EVP-BB4A9B000--3DModel-STEP-56544.STEP
│ │ ├── OSO-SWAT-A1-05-eagle-import.kicad_sym
│ │ ├── OSO-SWAT-B1-03.zip
│ │ ├── OSO-SWAT-B1.kicad_dru
│ │ ├── OSO-SWAT-B1.kicad_pcb
│ │ ├── OSO-SWAT-B1.kicad_prl
│ │ ├── OSO-SWAT-B1.kicad_pro
│ │ ├── OSO-SWAT-B1.kicad_sch
│ │ ├── OSO-SWAT-B1.pretty
│ │ │ ├── CASIO-F91W-OUTLINE-USB.kicad_mod
│ │ │ ├── FH19C9S05SH10.kicad_mod
│ │ │ ├── FIDUCIAL_1MM.kicad_mod
│ │ │ ├── LED_QBLP655.kicad_mod
│ │ │ ├── MICROBUILDER_TESTPOINT_ROUND_1.5MM.kicad_mod
│ │ │ ├── MICROBUILDER__0805MP.kicad_mod
│ │ │ ├── OSO_BEAR_250X360MIL_1000DPI.kicad_mod
│ │ │ ├── OSO_WORDMARK_ONELINE_350MIL_1000DPI.kicad_mod
│ │ │ ├── QFN64_9X9MC_MCH.kicad_mod
│ │ │ ├── SOD-323F.kicad_mod
│ │ │ ├── SOT65P210X110-5N.kicad_mod
│ │ │ ├── SW_EVP-BB1AAB000.kicad_mod
│ │ │ ├── XTAL3215.kicad_mod
│ │ │ ├── _0402MP.kicad_mod
│ │ │ └── _0603MP.kicad_mod
│ │ ├── OSO-SWD.pretty
│ │ │ ├── OSO_SWD_2x3.kicad_mod
│ │ │ └── OSO_SWD_Linear.kicad_mod
│ │ ├── OSO_SWD.kicad_sym
│ │ ├── QBLP655_QBLP655R_BI_TRI.step
│ │ ├── empty.kicad_wks
│ │ ├── fp-lib-table
│ │ └── sym-lib-table
│ └── OSO-SWAT-C1
│ │ ├── ELT-3KN004B.wrl
│ │ ├── EVP-BB4A9B000--3DModel-STEP-56544.STEP
│ │ ├── FH19C-9S-0.5SH.stp
│ │ ├── FPC-SMD_9P-P0.50_L6.3-W3.8-H1.0-THD0510-09CL-GF.wrl
│ │ ├── NX3215SA.step
│ │ ├── OSO-SWAT-A1-05-eagle-import.kicad_sym
│ │ ├── OSO-SWAT-C1-06.zip
│ │ ├── OSO-SWAT-C1-rounded.kicad_pcb
│ │ ├── OSO-SWAT-C1-rounded.kicad_prl
│ │ ├── OSO-SWAT-C1-rounded.kicad_pro
│ │ ├── OSO-SWAT-C1.kicad_dru
│ │ ├── OSO-SWAT-C1.kicad_pcb
│ │ ├── OSO-SWAT-C1.kicad_prl
│ │ ├── OSO-SWAT-C1.kicad_pro
│ │ ├── OSO-SWAT-C1.kicad_sch
│ │ ├── OSO-SWAT-C1.pretty
│ │ ├── CASIO-F91W-OUTLINE-USB.kicad_mod
│ │ ├── ELT3KN.kicad_mod
│ │ ├── FH19C9S05SH10.kicad_mod
│ │ ├── FIDUCIAL_1MM.kicad_mod
│ │ ├── LED_QBLP655.kicad_mod
│ │ ├── LED_QBLP655_RGB.kicad_mod
│ │ ├── MICROBUILDER_TESTPOINT_ROUND_1.5MM.kicad_mod
│ │ ├── MICROBUILDER__0805MP.kicad_mod
│ │ ├── OSO_BEAR_250X360MIL_1000DPI.kicad_mod
│ │ ├── OSO_WORDMARK_ONELINE_350MIL_1000DPI.kicad_mod
│ │ ├── QFN64_9X9MC_MCH.kicad_mod
│ │ ├── SOD-323F.kicad_mod
│ │ ├── SOT65P210X110-5N.kicad_mod
│ │ ├── SW_EVP-BB1AAB000.kicad_mod
│ │ ├── XTAL3215.kicad_mod
│ │ ├── _0402MP.kicad_mod
│ │ └── _0603MP.kicad_mod
│ │ ├── OSO-SWAT-C1.round-tracks-config
│ │ ├── OSO-SWD.pretty
│ │ ├── OSO_SWD_2x3.kicad_mod
│ │ └── OSO_SWD_Linear.kicad_mod
│ │ ├── OSO_SWD.kicad_sym
│ │ ├── QBLP655_QBLP655R_BI_TRI.step
│ │ ├── contact_adjusted_angle.step
│ │ ├── empty.kicad_wks
│ │ ├── fp-lib-table
│ │ └── sym-lib-table
└── Sensor Boards
│ ├── Eagle (Legacy Boards)
│ ├── Community
│ │ ├── BMI270-SensorBoard.brd
│ │ └── BMI270-SensorBoard.sch
│ ├── Shipped
│ │ ├── OSO-SWAB-A1-00 Temperature + Test Points.brd
│ │ └── OSO-SWAB-A1-00 Temperature + Test Points.sch
│ ├── Tested
│ │ ├── OSO-MISC-21-002 Sensor Watch Environment.brd
│ │ ├── OSO-MISC-21-002 Sensor Watch Environment.sch
│ │ ├── OSO-MISC-21-016 Power Test.brd
│ │ ├── OSO-MISC-21-016 Power Test.sch
│ │ ├── OSO-MISC-21-017 Sensor Watch Flash.brd
│ │ ├── OSO-MISC-21-017 Sensor Watch Flash.sch
│ │ ├── OSO-MISC-21-019 Sensor Watch Test.brd
│ │ ├── OSO-MISC-21-019 Sensor Watch Test.sch
│ │ ├── OSO-MISC-21-021 Sensor Watch Motion II.brd
│ │ ├── OSO-MISC-21-021 Sensor Watch Motion II.sch
│ │ ├── OSO-MISC-22-005 UART Breakout.brd
│ │ └── OSO-MISC-22-005 UART Breakout.sch
│ └── Untested - WIP - Not Recommended
│ │ ├── OSO-MISC-21-001 Sensor Watch Express.brd
│ │ ├── OSO-MISC-21-001 Sensor Watch Express.sch
│ │ ├── OSO-MISC-21-003 Sensor Watch Motion.brd
│ │ ├── OSO-MISC-21-003 Sensor Watch Motion.sch
│ │ ├── OSO-MISC-21-004 Sensor Watch Testpoints.brd
│ │ ├── OSO-MISC-21-004 Sensor Watch Testpoints.sch
│ │ ├── OSO-MISC-21-008 Hiking Log.brd
│ │ ├── OSO-MISC-21-008 Hiking Log.sch
│ │ ├── OSO-MISC-21-009 Simple Thermistor Board.brd
│ │ ├── OSO-MISC-21-009 Simple Thermistor Board.sch
│ │ ├── OSO-MISC-21-010 Light Sensor.brd
│ │ ├── OSO-MISC-21-010 Light Sensor.sch
│ │ ├── OSO-MISC-21-011 RFID.brd
│ │ ├── OSO-MISC-21-011 RFID.sch
│ │ ├── OSO-MISC-21-012 Sensor Watch Testpoints v2.brd
│ │ ├── OSO-MISC-21-012 Sensor Watch Testpoints v2.sch
│ │ ├── OSO-MISC-21-015 Temperature and Light Board.brd
│ │ ├── OSO-MISC-21-015 Temperature and Light Board.sch
│ │ ├── OSO-MISC-21-018 Temperature Board.brd
│ │ ├── OSO-MISC-21-018 Temperature Board.sch
│ │ ├── OSO-MISC-21-020 Temperature + GPIO Board.brd
│ │ ├── OSO-MISC-21-020 Temperature + GPIO Board.sch
│ │ ├── OSO-MISC-21-022 Temperature + GPIO + I2C Board.brd
│ │ ├── OSO-MISC-21-022 Temperature + GPIO + I2C Board.sch
│ │ ├── OSO-MISC-21-023 Temperature + GPIO + I2C Alternate.brd
│ │ ├── OSO-MISC-21-023 Temperature + GPIO + I2C Alternate.sch
│ │ ├── OSO-MISC-21-024 Temperature + GPIO + I2C Alternate 2.brd
│ │ ├── OSO-MISC-21-024 Temperature + GPIO + I2C Alternate 2.sch
│ │ ├── OSO-MISC-22-001 Temperature + GPIO + I2C.brd
│ │ ├── OSO-MISC-22-001 Temperature + GPIO + I2C.sch
│ │ ├── OSO-MISC-22-002 Sensor Watch Motion Express.brd
│ │ ├── OSO-MISC-22-002 Sensor Watch Motion Express.sch
│ │ ├── OSO-MISC-22-004 WIP-NFC.brd
│ │ └── OSO-MISC-22-004 WIP-NFC.sch
│ ├── Gerbers
│ └── OSO-SWAB-A1-00 Temperature + Test Points_2022-01-26.zip
│ ├── Kicad
│ └── OSO-SWAB-B1-00 Sensor Watch Accelerometer
│ │ ├── OSO-SWAB-B1-00 Sensor Watch Accelerometer.kicad_dru
│ │ ├── OSO-SWAB-B1-00 Sensor Watch Accelerometer.kicad_pcb
│ │ ├── OSO-SWAB-B1-00 Sensor Watch Accelerometer.kicad_prl
│ │ ├── OSO-SWAB-B1-00 Sensor Watch Accelerometer.kicad_pro
│ │ ├── OSO-SWAB-B1-00 Sensor Watch Accelerometer.kicad_sch
│ │ ├── OSO-SWAB-B1-00 Sensor Watch Accelerometer.pretty
│ │ ├── B1,27.kicad_mod
│ │ ├── FH19C9S05SH10-FFC.kicad_mod
│ │ ├── LGA12R50P4X4_200X200X70.kicad_mod
│ │ └── _0603MP.kicad_mod
│ │ ├── OSO-SWAB-B1-00.zip
│ │ ├── empty.kicad_wks
│ │ ├── fp-lib-table
│ │ └── sym-lib-table
│ └── Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001
│ ├── .gitignore
│ ├── Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001-cache.lib
│ ├── Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001.kicad_pcb
│ ├── Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001.kicad_pcb-bak
│ ├── Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001.pretty
│ ├── B1,27.kicad_mod
│ ├── FH19C9S05SH10-FFC.kicad_mod
│ └── _0603MP.kicad_mod
│ ├── Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001.sch
│ ├── Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001.sch-bak
│ ├── Q3Q-SWAB-A1-00_Temperature_+_Test_Points_+_OPT3001-eagle-import.dcm
│ ├── Q3Q-SWAB-A1-00_Temperature_+_Test_Points_+_OPT3001-eagle-import.lib
│ ├── empty.kicad_wks
│ ├── fp-info-cache
│ ├── fp-lib-table
│ └── sym-lib-table
├── README.md
├── apps
├── accelerometer-test
│ ├── Makefile
│ └── app.c
├── beats-time
│ ├── app.c
│ └── make
│ │ └── Makefile
├── buzzer-test
│ ├── app.c
│ └── make
│ │ └── Makefile
├── eeprom-emulation-upgrade
│ ├── Makefile
│ └── app.c
├── flash-test
│ ├── Makefile
│ └── app.c
├── functional-test
│ ├── app.c
│ └── make
│ │ └── Makefile
├── pro-rainbow-test
│ ├── app.c
│ └── make
│ │ └── Makefile
├── sensor-board-test
│ ├── app.c
│ └── make
│ │ └── Makefile
├── sensor-watch-lite-test
│ ├── app.c
│ └── make
│ │ └── Makefile
├── sensor-watch-pro-test
│ ├── app.c
│ └── make
│ │ └── Makefile
├── spi-test
│ ├── Makefile
│ └── app.c
├── starter-project
│ ├── Makefile
│ └── app.c
└── uart-display
│ ├── Makefile
│ └── app.c
├── boards
├── OSO-FEAL-A1-00
│ └── pins.h
├── OSO-SWAT-A1-02
│ └── pins.h
├── OSO-SWAT-A1-04
│ └── pins.h
├── OSO-SWAT-A1-05
│ └── pins.h
└── OSO-SWAT-C1-00
│ └── pins.h
├── images
├── sensor-board-pinout.png
├── sensor-board.png
└── sensor-watch.jpg
├── make.mk
├── movement
├── README.md
├── alt_fw
│ ├── alt_time.h
│ ├── backer.h
│ ├── deep_space_now.h
│ ├── focus.h
│ ├── the_athlete.h
│ ├── the_backpacker.h
│ ├── the_stargazer.h
│ └── timers.h
├── filesystem.c
├── filesystem.h
├── lib
│ ├── TOTP
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── TOTP.c
│ │ ├── TOTP.h
│ │ ├── example.c
│ │ ├── sha1.c
│ │ ├── sha1.h
│ │ ├── sha256.c
│ │ ├── sha256.h
│ │ ├── sha512.c
│ │ └── sha512.h
│ ├── astrolib
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── astrolib.c
│ │ └── astrolib.h
│ ├── base32
│ │ ├── base32.c
│ │ └── base32.h
│ ├── chirpy_tx
│ │ ├── chirpy_tx.c
│ │ ├── chirpy_tx.h
│ │ └── test
│ │ │ ├── test_main.c
│ │ │ ├── unity.c
│ │ │ ├── unity.h
│ │ │ └── unity_internals.h
│ ├── morsecalc
│ │ ├── calc.c
│ │ ├── calc.h
│ │ ├── calc_fns.c
│ │ ├── calc_fns.h
│ │ ├── calc_strtof.c
│ │ ├── morsecalc_display.c
│ │ ├── morsecalc_display.h
│ │ └── test_morsecalc.c
│ ├── smallchesslib
│ │ └── smallchesslib.h
│ ├── sunriset
│ │ ├── sunriset.c
│ │ └── sunriset.h
│ └── vsop87
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── vsop87a_micro.c
│ │ ├── vsop87a_micro.h
│ │ ├── vsop87a_milli.c
│ │ └── vsop87a_milli.h
├── make
│ ├── .gitignore
│ ├── Makefile
│ └── make_alternate_fw.sh
├── movement.c
├── movement.h
├── movement_config.h
├── movement_custom_signal_tunes.h
├── movement_faces.h
├── shell.c
├── shell.h
├── shell_cmd_list.c
├── shell_cmd_list.h
├── template
│ ├── template.c
│ ├── template.h
│ └── watch_face.py
└── watch_faces
│ ├── clock
│ ├── beats_face.c
│ ├── beats_face.h
│ ├── clock_face.c
│ ├── clock_face.h
│ ├── close_enough_clock_face.c
│ ├── close_enough_clock_face.h
│ ├── day_night_percentage_face.c
│ ├── day_night_percentage_face.h
│ ├── decimal_time_face.c
│ ├── decimal_time_face.h
│ ├── french_revolutionary_face.c
│ ├── french_revolutionary_face.h
│ ├── mars_time_face.c
│ ├── mars_time_face.h
│ ├── minimal_clock_face.c
│ ├── minimal_clock_face.h
│ ├── minute_repeater_decimal_face.c
│ ├── minute_repeater_decimal_face.h
│ ├── repetition_minute_face.c
│ ├── repetition_minute_face.h
│ ├── simple_clock_bin_led_face.c
│ ├── simple_clock_bin_led_face.h
│ ├── simple_clock_face.c
│ ├── simple_clock_face.h
│ ├── weeknumber_clock_face.c
│ ├── weeknumber_clock_face.h
│ ├── world_clock2_face.c
│ ├── world_clock2_face.h
│ ├── world_clock_face.c
│ ├── world_clock_face.h
│ ├── wyoscan_face.c
│ └── wyoscan_face.h
│ ├── complication
│ ├── activity_face.c
│ ├── activity_face.h
│ ├── alarm_face.c
│ ├── alarm_face.h
│ ├── astronomy_face.c
│ ├── astronomy_face.h
│ ├── blinky_face.c
│ ├── blinky_face.h
│ ├── breathing_face.c
│ ├── breathing_face.h
│ ├── butterfly_game_face.c
│ ├── butterfly_game_face.h
│ ├── couch_to_5k_face.c
│ ├── couch_to_5k_face.h
│ ├── countdown_face.c
│ ├── countdown_face.h
│ ├── counter_face.c
│ ├── counter_face.h
│ ├── databank_face.c
│ ├── databank_face.h
│ ├── day_one_face.c
│ ├── day_one_face.h
│ ├── deadline_face.c
│ ├── deadline_face.h
│ ├── discgolf_face.c
│ ├── discgolf_face.h
│ ├── dual_timer_face.c
│ ├── dual_timer_face.h
│ ├── endless_runner_face.c
│ ├── endless_runner_face.h
│ ├── flashlight_face.c
│ ├── flashlight_face.h
│ ├── geomancy_face.c
│ ├── geomancy_face.h
│ ├── habit_face.c
│ ├── habit_face.h
│ ├── higher_lower_game_face.c
│ ├── higher_lower_game_face.h
│ ├── interval_face.c
│ ├── interval_face.h
│ ├── invaders_face.c
│ ├── invaders_face.h
│ ├── kitchen_conversions_face.c
│ ├── kitchen_conversions_face.h
│ ├── menstrual_cycle_face.c
│ ├── menstrual_cycle_face.h
│ ├── metronome_face.c
│ ├── metronome_face.h
│ ├── moon_phase_face.c
│ ├── moon_phase_face.h
│ ├── morsecalc_face.c
│ ├── morsecalc_face.h
│ ├── orrery_face.c
│ ├── orrery_face.h
│ ├── periodic_face.c
│ ├── periodic_face.h
│ ├── planetary_hours_face.c
│ ├── planetary_hours_face.h
│ ├── planetary_time_face.c
│ ├── planetary_time_face.h
│ ├── probability_face.c
│ ├── probability_face.h
│ ├── pulsometer_face.c
│ ├── pulsometer_face.h
│ ├── randonaut_face.c
│ ├── randonaut_face.h
│ ├── ratemeter_face.c
│ ├── ratemeter_face.h
│ ├── rpn_calculator_alt_face.c
│ ├── rpn_calculator_alt_face.h
│ ├── rpn_calculator_face.c
│ ├── rpn_calculator_face.h
│ ├── sailing_face.c
│ ├── sailing_face.h
│ ├── ships_bell_face.c
│ ├── ships_bell_face.h
│ ├── simon_face.c
│ ├── simon_face.h
│ ├── simple_calculator_face.c
│ ├── simple_calculator_face.h
│ ├── simple_coin_flip_face.c
│ ├── simple_coin_flip_face.h
│ ├── smallchess_face.c
│ ├── smallchess_face.h
│ ├── solstice_face.c
│ ├── solstice_face.h
│ ├── stock_stopwatch_face.c
│ ├── stock_stopwatch_face.h
│ ├── stopwatch_face.c
│ ├── stopwatch_face.h
│ ├── sunrise_sunset_face.c
│ ├── sunrise_sunset_face.h
│ ├── tachymeter_face.c
│ ├── tachymeter_face.h
│ ├── tally_face.c
│ ├── tally_face.h
│ ├── tarot_face.c
│ ├── tarot_face.h
│ ├── tempchart_face.c
│ ├── tempchart_face.h
│ ├── time_left_face.c
│ ├── time_left_face.h
│ ├── timer_face.c
│ ├── timer_face.h
│ ├── tomato_face.c
│ ├── tomato_face.h
│ ├── toss_up_face.c
│ ├── toss_up_face.h
│ ├── totp_face.c
│ ├── totp_face.h
│ ├── totp_face_lfs.c
│ ├── totp_face_lfs.h
│ ├── tuning_tones_face.c
│ ├── tuning_tones_face.h
│ ├── wake_face.c
│ ├── wake_face.h
│ ├── wareki_face.c
│ ├── wareki_face.h
│ ├── wordle_face.c
│ ├── wordle_face.h
│ └── wordle_face_dict.h
│ ├── demo
│ ├── beeps_face.c
│ ├── beeps_face.h
│ ├── character_set_face.c
│ ├── character_set_face.h
│ ├── chirpy_demo_face.c
│ ├── chirpy_demo_face.h
│ ├── demo_face.c
│ ├── demo_face.h
│ ├── frequency_correction_face.c
│ ├── frequency_correction_face.h
│ ├── hello_there_face.c
│ ├── hello_there_face.h
│ ├── lis2dw_logging_face.c
│ ├── lis2dw_logging_face.h
│ ├── voltage_face.c
│ └── voltage_face.h
│ ├── sensor
│ ├── accel_interrupt_count_face.c
│ ├── accel_interrupt_count_face.h
│ ├── accelerometer_data_acquisition_face.c
│ ├── accelerometer_data_acquisition_face.h
│ ├── alarm_thermometer_face.c
│ ├── alarm_thermometer_face.h
│ ├── lightmeter_face.c
│ ├── lightmeter_face.h
│ ├── minmax_face.c
│ ├── minmax_face.h
│ ├── thermistor_logging_face.c
│ ├── thermistor_logging_face.h
│ ├── thermistor_readout_face.c
│ ├── thermistor_readout_face.h
│ ├── thermistor_testing_face.c
│ └── thermistor_testing_face.h
│ └── settings
│ ├── finetune_face.c
│ ├── finetune_face.h
│ ├── nanosec_face.c
│ ├── nanosec_face.h
│ ├── place_face.h
│ ├── preferences_face.c
│ ├── preferences_face.h
│ ├── save_load_face.c
│ ├── save_load_face.h
│ ├── set_time_face.c
│ ├── set_time_face.h
│ ├── set_time_hackwatch_face.c
│ └── set_time_hackwatch_face.h
├── openocd.cfg
├── rules.mk
├── utils
├── flash_watch_pyruler
│ ├── bootloader.h
│ └── flash_watch_pyruler.ino
├── motion_express_utilities
│ ├── csv2gnuplot.sh
│ ├── plot.options
│ └── process_motion_dump.py
├── movement_bulk_installer
│ ├── shipboards.sh
│ ├── standard-green.uf2
│ └── standard-red.uf2
├── uf2conv.py
└── wordle_face
│ └── wordle_list.py
└── watch-library
├── hardware
├── hal
│ ├── documentation
│ │ ├── ext_irq.rst
│ │ ├── flash.rst
│ │ ├── i2c_master_sync.rst
│ │ ├── rand_sync.rst
│ │ ├── slcd_sync.rst
│ │ ├── spi_master_sync.rst
│ │ └── usart_sync.rst
│ ├── include
│ │ ├── hal_atomic.h
│ │ ├── hal_calendar.h
│ │ ├── hal_delay.h
│ │ ├── hal_ext_irq.h
│ │ ├── hal_flash.h
│ │ ├── hal_gpio.h
│ │ ├── hal_i2c_m_sync.h
│ │ ├── hal_init.h
│ │ ├── hal_io.h
│ │ ├── hal_rand_sync.h
│ │ ├── hal_slcd_sync.h
│ │ ├── hal_sleep.h
│ │ ├── hal_spi_m_sync.h
│ │ ├── hal_usart_sync.h
│ │ ├── hpl_calendar.h
│ │ ├── hpl_core.h
│ │ ├── hpl_delay.h
│ │ ├── hpl_dma.h
│ │ ├── hpl_ext_irq.h
│ │ ├── hpl_flash.h
│ │ ├── hpl_gpio.h
│ │ ├── hpl_i2c_m_async.h
│ │ ├── hpl_i2c_m_sync.h
│ │ ├── hpl_i2c_s_async.h
│ │ ├── hpl_i2c_s_sync.h
│ │ ├── hpl_init.h
│ │ ├── hpl_irq.h
│ │ ├── hpl_missing_features.h
│ │ ├── hpl_rand_sync.h
│ │ ├── hpl_reset.h
│ │ ├── hpl_slcd.h
│ │ ├── hpl_slcd_sync.h
│ │ ├── hpl_sleep.h
│ │ ├── hpl_spi.h
│ │ ├── hpl_spi_async.h
│ │ ├── hpl_spi_dma.h
│ │ ├── hpl_spi_m_async.h
│ │ ├── hpl_spi_m_dma.h
│ │ ├── hpl_spi_m_sync.h
│ │ ├── hpl_spi_s_async.h
│ │ ├── hpl_spi_s_sync.h
│ │ ├── hpl_spi_sync.h
│ │ ├── hpl_time_measure.h
│ │ ├── hpl_timer.h
│ │ ├── hpl_usart.h
│ │ ├── hpl_usart_async.h
│ │ ├── hpl_usart_sync.h
│ │ └── hpl_user_area.h
│ ├── src
│ │ ├── hal_atomic.c
│ │ ├── hal_calendar.c
│ │ ├── hal_delay.c
│ │ ├── hal_ext_irq.c
│ │ ├── hal_flash.c
│ │ ├── hal_gpio.c
│ │ ├── hal_i2c_m_sync.c
│ │ ├── hal_init.c
│ │ ├── hal_io.c
│ │ ├── hal_rand_sync.c
│ │ ├── hal_slcd_sync.c
│ │ ├── hal_sleep.c
│ │ ├── hal_spi_m_sync.c
│ │ └── hal_usart_sync.c
│ └── utils
│ │ ├── include
│ │ ├── compiler.h
│ │ ├── err_codes.h
│ │ ├── events.h
│ │ ├── parts.h
│ │ ├── utils.h
│ │ ├── utils_assert.h
│ │ ├── utils_decrement_macro.h
│ │ ├── utils_event.h
│ │ ├── utils_increment_macro.h
│ │ ├── utils_list.h
│ │ ├── utils_recursion_macro.h
│ │ └── utils_repeat_macro.h
│ │ └── src
│ │ ├── utils_assert.c
│ │ ├── utils_event.c
│ │ ├── utils_list.c
│ │ └── utils_syscalls.c
├── hpl
│ ├── core
│ │ ├── hpl_core_m0plus_base.c
│ │ ├── hpl_core_port.h
│ │ └── hpl_init.c
│ ├── dmac
│ │ └── hpl_dmac.c
│ ├── eic
│ │ └── hpl_eic.c
│ ├── gclk
│ │ ├── hpl_gclk.c
│ │ └── hpl_gclk_base.h
│ ├── mclk
│ │ └── hpl_mclk.c
│ ├── nvmctrl
│ │ └── hpl_nvmctrl.c
│ ├── osc32kctrl
│ │ └── hpl_osc32kctrl.c
│ ├── oscctrl
│ │ └── hpl_oscctrl.c
│ ├── pm
│ │ ├── hpl_pm.c
│ │ └── hpl_pm_base.h
│ ├── port
│ │ └── hpl_gpio_base.h
│ ├── sercom
│ │ └── hpl_sercom.c
│ ├── slcd
│ │ ├── hpl_slcd.c
│ │ └── hpl_slcd_cm.h
│ ├── systick
│ │ └── hpl_systick.c
│ └── trng
│ │ └── hpl_trng.c
├── hri
│ ├── hri_ac_l22.h
│ ├── hri_adc_l22.h
│ ├── hri_aes_l22.h
│ ├── hri_ccl_l22.h
│ ├── hri_dmac_l22.h
│ ├── hri_dsu_l22.h
│ ├── hri_eic_l22.h
│ ├── hri_evsys_l22.h
│ ├── hri_freqm_l22.h
│ ├── hri_gclk_l22.h
│ ├── hri_l22.h
│ ├── hri_mclk_l22.h
│ ├── hri_mtb_l22.h
│ ├── hri_nvic_l22.h
│ ├── hri_nvmctrl_l22.h
│ ├── hri_osc32kctrl_l22.h
│ ├── hri_oscctrl_l22.h
│ ├── hri_pac_l22.h
│ ├── hri_pm_l22.h
│ ├── hri_port_l22.h
│ ├── hri_rstc_l22.h
│ ├── hri_rtc_l22.h
│ ├── hri_sercom_l22.h
│ ├── hri_slcd_l22.h
│ ├── hri_supc_l22.h
│ ├── hri_systemcontrol_l22.h
│ ├── hri_systick_l22.h
│ ├── hri_tc_l22.h
│ ├── hri_tcc_l22.h
│ ├── hri_trng_l22.h
│ ├── hri_usb_l22.h
│ └── hri_wdt_l22.h
├── hw
│ ├── driver_init.c
│ └── driver_init.h
├── include
│ ├── component-version.h
│ ├── component
│ │ ├── ac.h
│ │ ├── adc.h
│ │ ├── aes.h
│ │ ├── ccl.h
│ │ ├── dmac.h
│ │ ├── dsu.h
│ │ ├── eic.h
│ │ ├── evsys.h
│ │ ├── freqm.h
│ │ ├── gclk.h
│ │ ├── mclk.h
│ │ ├── mtb.h
│ │ ├── nvmctrl.h
│ │ ├── osc32kctrl.h
│ │ ├── oscctrl.h
│ │ ├── pac.h
│ │ ├── pm.h
│ │ ├── port.h
│ │ ├── rstc.h
│ │ ├── rtc.h
│ │ ├── sercom.h
│ │ ├── slcd.h
│ │ ├── supc.h
│ │ ├── tc.h
│ │ ├── tcc.h
│ │ ├── trng.h
│ │ ├── usb.h
│ │ └── wdt.h
│ ├── core_cm0plus.h
│ ├── core_cmFunc.h
│ ├── core_cmInstr.h
│ ├── instance
│ │ ├── ac.h
│ │ ├── adc.h
│ │ ├── aes.h
│ │ ├── ccl.h
│ │ ├── dmac.h
│ │ ├── dsu.h
│ │ ├── eic.h
│ │ ├── evsys.h
│ │ ├── freqm.h
│ │ ├── gclk.h
│ │ ├── mclk.h
│ │ ├── mtb.h
│ │ ├── nvmctrl.h
│ │ ├── osc32kctrl.h
│ │ ├── oscctrl.h
│ │ ├── pac.h
│ │ ├── pm.h
│ │ ├── port.h
│ │ ├── ptc.h
│ │ ├── rstc.h
│ │ ├── rtc.h
│ │ ├── sercom0.h
│ │ ├── sercom1.h
│ │ ├── sercom2.h
│ │ ├── sercom3.h
│ │ ├── sercom4.h
│ │ ├── sercom5.h
│ │ ├── slcd.h
│ │ ├── supc.h
│ │ ├── tc0.h
│ │ ├── tc1.h
│ │ ├── tc2.h
│ │ ├── tc3.h
│ │ ├── tcc0.h
│ │ ├── trng.h
│ │ ├── usb.h
│ │ └── wdt.h
│ ├── pio
│ │ ├── saml22g16a.h
│ │ ├── saml22g17a.h
│ │ ├── saml22g18a.h
│ │ ├── saml22j16a.h
│ │ ├── saml22j17a.h
│ │ ├── saml22j18a.h
│ │ ├── saml22n16a.h
│ │ ├── saml22n17a.h
│ │ └── saml22n18a.h
│ ├── sam.h
│ ├── saml22.h
│ ├── saml22g16a.h
│ ├── saml22g17a.h
│ ├── saml22g18a.h
│ ├── saml22j16a.h
│ ├── saml22j17a.h
│ ├── saml22j18a.h
│ ├── saml22n16a.h
│ ├── saml22n17a.h
│ ├── saml22n18a.h
│ └── system_saml22.h
├── linker
│ └── saml22j18.ld
├── main.c
├── startup_saml22.c
└── watch
│ ├── tusb_config.h
│ ├── watch.c
│ ├── watch_adc.c
│ ├── watch_buzzer.c
│ ├── watch_deepsleep.c
│ ├── watch_extint.c
│ ├── watch_gpio.c
│ ├── watch_i2c.c
│ ├── watch_led.c
│ ├── watch_private.c
│ ├── watch_private_cdc.c
│ ├── watch_private_cdc.h
│ ├── watch_rtc.c
│ ├── watch_slcd.c
│ ├── watch_spi.c
│ ├── watch_storage.c
│ └── watch_uart.c
├── shared
├── config
│ ├── RTE_Components.h
│ ├── hpl_dmac_config.h
│ ├── hpl_eic_config.h
│ ├── hpl_gclk_config.h
│ ├── hpl_mclk_config.h
│ ├── hpl_nvmctrl_config.h
│ ├── hpl_osc32kctrl_config.h
│ ├── hpl_oscctrl_config.h
│ ├── hpl_port_config.h
│ ├── hpl_rtc_config.h
│ ├── hpl_sercom_config.h
│ ├── hpl_slcd_config.h
│ ├── hpl_systick_config.h
│ ├── hpl_trng_config.h
│ ├── nv_storage_config.h
│ └── peripheral_clk_config.h
├── driver
│ ├── lis2dw.c
│ ├── lis2dw.h
│ ├── opt3001.c
│ ├── opt3001.h
│ ├── spiflash.c
│ ├── spiflash.h
│ ├── thermistor_driver.c
│ └── thermistor_driver.h
└── watch
│ ├── watch.h
│ ├── watch_adc.h
│ ├── watch_app.h
│ ├── watch_buzzer.h
│ ├── watch_deepsleep.h
│ ├── watch_extint.h
│ ├── watch_gpio.h
│ ├── watch_i2c.h
│ ├── watch_led.h
│ ├── watch_private.h
│ ├── watch_private_buzzer.h
│ ├── watch_private_display.c
│ ├── watch_private_display.h
│ ├── watch_rtc.h
│ ├── watch_slcd.h
│ ├── watch_spi.h
│ ├── watch_storage.h
│ ├── watch_uart.h
│ ├── watch_utility.c
│ └── watch_utility.h
└── simulator
├── hpl
└── port
│ └── hpl_gpio_base.h
├── main.c
├── shell.html
└── watch
├── watch.c
├── watch_adc.c
├── watch_buzzer.c
├── watch_deepsleep.c
├── watch_extint.c
├── watch_gpio.c
├── watch_i2c.c
├── watch_led.c
├── watch_main_loop.h
├── watch_private.c
├── watch_rtc.c
├── watch_slcd.c
├── watch_spi.c
├── watch_storage.c
└── watch_uart.c
/.devcontainer/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:24.04
2 |
3 | # TODO: Clean this up once buildkit is supported gracefully in devcontainers
4 | # https://github.com/microsoft/vscode-remote-release/issues/1409
5 |
6 | ARG X86_64_TOOLCHAIN_FILENAME="gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2"
7 | ARG X86_64_TOOLCHAIN="https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.07/gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2"
8 | ARG X86_64_TOOLCHAIN_CHECKSUM="b56ae639d9183c340f065ae114a30202"
9 |
10 | ARG AARCH64_TOOLCHAIN_FILENAME="gcc-arm-none-eabi-10.3-2021.07-aarch64-linux.tar.bz2"
11 | ARG AARCH64_TOOLCHAIN="https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.07/gcc-arm-none-eabi-10.3-2021.07-aarch64-linux.tar.bz2"
12 | ARG AARCH64_TOOLCHAIN_CHECKSUM="c20b0535d01f8d4418341d893c62a782"
13 |
14 | WORKDIR /setup
15 |
16 | # Install required packages
17 | RUN apt-get update \
18 | && apt-get install -y --no-install-recommends \
19 | # make is used as the build system
20 | make \
21 | # git is used for fetching submodules & interactive development
22 | git \
23 | # bzip2 is required to extract the Arm toolchain
24 | bzip2 \
25 | # ca certs need to be available for fetching git submodules
26 | ca-certificates \
27 | # python is used to convert binaries to uf2 files
28 | python3 python-is-python3 \
29 | # emscripten for building simulator
30 | emscripten
31 |
32 | # Download and verify both x86-64 and aarch64 toolchains. This is unfortunate and
33 | # slows down the build, but it's a clean-ish option until buildkit can be used.
34 | ADD $X86_64_TOOLCHAIN $X86_64_TOOLCHAIN_FILENAME
35 | ADD $AARCH64_TOOLCHAIN $AARCH64_TOOLCHAIN_FILENAME
36 |
37 | RUN echo "${X86_64_TOOLCHAIN_CHECKSUM} ${X86_64_TOOLCHAIN_FILENAME}" | md5sum --check
38 | RUN echo "${AARCH64_TOOLCHAIN_CHECKSUM} ${AARCH64_TOOLCHAIN_FILENAME}" | md5sum --check
39 |
40 | # Extract toolchain directly into /usr
41 | RUN /bin/sh -c 'set -ex && \
42 | ARCH=`uname -m` && \
43 | if [ "$ARCH" = "x86_64" ]; then \
44 | tar --strip-components=1 -C /usr -xjf $X86_64_TOOLCHAIN_FILENAME ; \
45 | else \
46 | tar --strip-components=1 -C /usr -xjf $AARCH64_TOOLCHAIN_FILENAME ; \
47 | fi'
48 |
49 | RUN rm $X86_64_TOOLCHAIN_FILENAME
50 | RUN rm $AARCH64_TOOLCHAIN_FILENAME
51 |
--------------------------------------------------------------------------------
/.devcontainer/devcontainer.json:
--------------------------------------------------------------------------------
1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2 | // https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/docker-existing-dockerfile
3 | {
4 | "name": "GNU Arm Embedded Environment",
5 | // Sets the run context to one level up instead of the .devcontainer folder.
6 | "context": "..",
7 | // Set the location of the dockerfile to use
8 | "dockerFile": "Dockerfile",
9 | // Set *default* container specific settings.json values on container create.
10 | "settings": {},
11 | // Add the IDs of extensions you want installed when the container is created.
12 | "extensions": [
13 | "ms-vscode.cpptools"
14 | ]
15 | // Uncomment to connect as a non-root user if you've added one. See https://aka.ms/vscode-remote/containers/non-root.
16 | // "remoteUser": "vscode"
17 | }
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Build
2 |
3 | on:
4 | pull_request:
5 | push:
6 | branches-ignore:
7 | - gh-pages
8 |
9 | env:
10 | COLOR: BLUE
11 |
12 | jobs:
13 | build:
14 | container:
15 | image: ghcr.io/armmbed/mbed-os-env:latest
16 | runs-on: ubuntu-latest
17 | steps:
18 | - name: Checkout
19 | uses: actions/checkout@v3
20 | - name: Work around CVE-2022-24765
21 | run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
22 | - name: Compile starter-project app
23 | run: make
24 | working-directory: 'apps/starter-project'
25 | - name: Compile accelerometer-test app
26 | run: make
27 | working-directory: 'apps/accelerometer-test'
28 | - name: Compile movement
29 | run: make
30 | working-directory: 'movement/make'
31 | - name: Upload UF2
32 | uses: actions/upload-artifact@v4
33 | with:
34 | name: watch.uf2
35 | path: movement/make/build/watch.uf2
36 |
37 | build-simulator:
38 | container:
39 | image: emscripten/emsdk
40 | runs-on: ubuntu-latest
41 | steps:
42 | - name: Checkout
43 | uses: actions/checkout@v3
44 | - name: Work around CVE-2022-24765
45 | run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
46 | - name: Compile movement
47 | run: emmake make
48 | working-directory: 'movement/make'
49 | - name: Archive simulator build
50 | working-directory: 'movement/make/build-sim'
51 | run: |
52 | cp watch.html index.html
53 | tar -czf simulator.tar.gz index.html watch.wasm watch.js
54 | - name: Upload simulator build
55 | uses: actions/upload-artifact@v4
56 | with:
57 | name: simulator.tar.gz
58 | path: movement/make/build-sim/simulator.tar.gz
59 |
--------------------------------------------------------------------------------
/.github/workflows/gh-pages.yml:
--------------------------------------------------------------------------------
1 | name: GitHub Pages
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | gh-pages:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: Checkout
13 | uses: actions/checkout@v2
14 | - name: Doxygen Action
15 | uses: mattnotmitt/doxygen-action@v1
16 | - name: Deploy
17 | uses: peaceiris/actions-gh-pages@v3
18 | with:
19 | github_token: ${{ secrets.GITHUB_TOKEN }}
20 | publish_branch: gh-pages
21 | publish_dir: docs/
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/build/
2 | **/build-sim/
3 | *.b#*
4 | *.bin
5 | *.d
6 | *.elf
7 | *.hex
8 | *.job
9 | *.lss
10 | *.map
11 | *.o
12 | *.pro
13 | *.s#*
14 | *.uf2
15 | *srec
16 | .DS_Store
17 | .idea/
18 | .vs
19 | .vscode
20 | docs/
21 | *.kicad_sch-bak
22 | *-backups/
23 | *.bak
24 | _autosave*
25 | fp-info-cache
26 | .~*
27 | *.plan
28 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "tinyusb"]
2 | path = tinyusb
3 | url = https://github.com/hathach/tinyusb.git
4 | [submodule "littlefs"]
5 | path = littlefs
6 | url = https://github.com/littlefs-project/littlefs.git
7 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-A1/OSO-SWAT-A1-05-BLUE_2021-09-20.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/PCB/Main Boards/OSO-SWAT-A1/OSO-SWAT-A1-05-BLUE_2021-09-20.zip
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO-SWAT-B1-03.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/PCB/Main Boards/OSO-SWAT-B1/OSO-SWAT-B1-03.zip
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO-SWAT-B1.kicad_dru:
--------------------------------------------------------------------------------
1 | (version 1)
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO-SWAT-B1.kicad_prl:
--------------------------------------------------------------------------------
1 | {
2 | "board": {
3 | "active_layer": 0,
4 | "active_layer_preset": "",
5 | "auto_track_width": false,
6 | "hidden_netclasses": [],
7 | "hidden_nets": [],
8 | "high_contrast_mode": 0,
9 | "net_color_mode": 1,
10 | "opacity": {
11 | "images": 0.6,
12 | "pads": 1.0,
13 | "tracks": 1.0,
14 | "vias": 1.0,
15 | "zones": 1.0
16 | },
17 | "ratsnest_display_mode": 0,
18 | "selection_filter": {
19 | "dimensions": true,
20 | "footprints": true,
21 | "graphics": true,
22 | "keepouts": true,
23 | "lockedItems": false,
24 | "otherItems": true,
25 | "pads": true,
26 | "text": true,
27 | "tracks": true,
28 | "vias": true,
29 | "zones": true
30 | },
31 | "visible_items": [
32 | 0,
33 | 1,
34 | 2,
35 | 3,
36 | 4,
37 | 5,
38 | 8,
39 | 9,
40 | 10,
41 | 11,
42 | 12,
43 | 13,
44 | 15,
45 | 16,
46 | 17,
47 | 18,
48 | 19,
49 | 20,
50 | 21,
51 | 22,
52 | 23,
53 | 24,
54 | 25,
55 | 26,
56 | 27,
57 | 28,
58 | 29,
59 | 30,
60 | 32,
61 | 33,
62 | 34,
63 | 35,
64 | 36,
65 | 39,
66 | 40
67 | ],
68 | "visible_layers": "0021020_ffffffff",
69 | "zone_display_mode": 1
70 | },
71 | "meta": {
72 | "filename": "OSO-SWAT-B1.kicad_prl",
73 | "version": 3
74 | },
75 | "project": {
76 | "files": []
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO-SWAT-B1.pretty/FIDUCIAL_1MM.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "FIDUCIAL_1MM" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (fp_text reference "REF**" (at 0 0) (layer "F.SilkS")
5 | (effects (font (size 1.27 1.27) (thickness 0.15)))
6 | (tstamp 084b231a-a841-4989-ba78-c80f52a1d530)
7 | )
8 | (fp_text value "" (at 0 0) (layer "F.Fab")
9 | (effects (font (size 1.27 1.27) (thickness 0.15)))
10 | (tstamp 5023af4a-f69e-458d-abff-77e97f0c49aa)
11 | )
12 | (fp_arc (start -0.75 0) (mid -0.53033 -0.53033) (end 0 -0.75) (layer "F.Mask") (width 0.5) (tstamp 243424d9-367c-4c55-9ce2-5c7f6b71c486))
13 | (fp_arc (start 0 0.75) (mid -0.53033 0.53033) (end -0.75 0) (layer "F.Mask") (width 0.5) (tstamp 38a261de-e7ad-4359-9a4e-e8325d947b3c))
14 | (fp_arc (start 0.75 0) (mid 0.53033 0.53033) (end 0 0.75) (layer "F.Mask") (width 0.5) (tstamp 3e5e4d91-af7b-467f-93be-7757d59f4acd))
15 | (fp_arc (start 0 -0.75) (mid 0.53033 -0.53033) (end 0.75 0) (layer "F.Mask") (width 0.5) (tstamp cba0161e-94ca-4df5-83f4-b38d910a40d8))
16 | (fp_arc (start 0 -0.75) (mid 0.53033 -0.53033) (end 0.75 0) (layer "F.CrtYd") (width 0.5) (tstamp 24375f2d-9f3c-47f3-bf1b-d9abc9459487))
17 | (fp_arc (start 0.75 0) (mid 0.53033 0.53033) (end 0 0.75) (layer "F.CrtYd") (width 0.5) (tstamp 61d35d35-c7e3-45c7-a1f6-4c560b28917a))
18 | (fp_arc (start 0 0.75) (mid -0.53033 0.53033) (end -0.75 0) (layer "F.CrtYd") (width 0.5) (tstamp b245f192-3aeb-4a3c-8f5f-5b2ac372cfb6))
19 | (fp_arc (start -0.75 0) (mid -0.53033 -0.53033) (end 0 -0.75) (layer "F.CrtYd") (width 0.5) (tstamp f012c0d9-2bab-4b5b-8327-ed4e32f900bb))
20 | (pad "1" smd roundrect (at 0 0) (size 1 1) (layers "F.Cu" "F.Mask") (roundrect_rratio 0.5)
21 | (solder_mask_margin 0.0635) (tstamp ea46b6d0-c0be-44d4-aa82-47c56ffdb259))
22 | )
23 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO-SWAT-B1.pretty/LED_QBLP655.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "LED_QBLP655" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (fp_text reference "REF**" (at 0.011609 -1.462631) (layer "F.SilkS")
5 | (effects (font (size 0.682286 0.682286) (thickness 0.14977)))
6 | (tstamp 441c2b28-158a-4d68-a991-31f4c6a03554)
7 | )
8 | (fp_text value ">VALUE" (at -0.054931 1.580818) (layer "F.Fab")
9 | (effects (font (size 0.677435 0.677435) (thickness 0.148705)))
10 | (tstamp 2f361345-03db-4c21-a99d-0b9cfab62aee)
11 | )
12 | (fp_circle (center -3.1 -0.5) (end -3 -0.5) (layer "F.SilkS") (width 0.2) (fill none) (tstamp 0ba68dd4-e618-4da0-b7e7-599817b38c08))
13 | (fp_line (start -1.6 -0.6) (end 1.6 -0.6) (layer "F.Fab") (width 0.127) (tstamp 3629e8ab-0a05-463c-9cb0-81d2e314e044))
14 | (fp_line (start -1.6 0.6) (end -1.6 -0.6) (layer "F.Fab") (width 0.127) (tstamp 379a3f23-154c-4da8-9d91-714d85fa6b82))
15 | (fp_line (start 1.6 -0.6) (end 1.6 0.6) (layer "F.Fab") (width 0.127) (tstamp 78db06e4-b90e-45d6-90ee-f31a25c04c7d))
16 | (fp_line (start 1.6 0.6) (end -1.6 0.6) (layer "F.Fab") (width 0.127) (tstamp de669889-6aee-41d8-9167-24b5b7cd2f7a))
17 | (fp_circle (center -3.1 -0.5) (end -3 -0.5) (layer "F.Fab") (width 0.2) (fill none) (tstamp a3f31f15-16ea-4248-8fe2-4f1f6cb6fef0))
18 | (pad "1" smd rect (at -1.5 -0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
19 | (solder_mask_margin 0.0635) (tstamp c0b010da-7837-47db-be16-93e46d77ee03))
20 | (pad "2" smd rect (at 1.5 -0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
21 | (solder_mask_margin 0.0635) (tstamp 0491e5ac-92c6-4da4-a40f-13768f4f5f7c))
22 | (pad "3" smd rect (at -1.5 0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
23 | (solder_mask_margin 0.0635) (tstamp d96a3b29-ffbb-4252-a695-34388cf2cce8))
24 | (pad "4" smd rect (at 1.5 0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
25 | (solder_mask_margin 0.0635) (tstamp a7b3dfda-cc06-4a25-8ceb-15247a6b386b))
26 | )
27 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO-SWAT-B1.pretty/MICROBUILDER_TESTPOINT_ROUND_1.5MM.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "MICROBUILDER_TESTPOINT_ROUND_1.5MM" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (fp_text reference "REF**" (at 1.143 0.127) (layer "F.SilkS")
5 | (effects (font (size 0.666496 0.666496) (thickness 0.146304)) (justify left bottom))
6 | (tstamp 3249263f-d424-465a-883e-c9fbfca1c498)
7 | )
8 | (fp_text value ">VALUE" (at 1.143 0.635) (layer "F.Fab")
9 | (effects (font (size 0.36576 0.36576) (thickness 0.04064)) (justify left bottom))
10 | (tstamp ffe18277-47dd-48a9-ae75-8daae098595b)
11 | )
12 | (fp_circle (center 0 0) (end 1 0) (layer "F.SilkS") (width 0.2032) (fill none) (tstamp 10aeb60f-0687-4840-aeb5-a5e914b89db2))
13 | (pad "P$1" smd roundrect (at 0 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (roundrect_rratio 0.5)
14 | (solder_mask_margin 0.0635) (tstamp 278b13e7-2a43-4fc5-a675-ea6ed2efdd4b))
15 | )
16 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO-SWAT-B1.pretty/MICROBUILDER__0805MP.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "MICROBUILDER__0805MP" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (descr "0805 MicroPitch")
5 | (fp_text reference "REF**" (at -1.5875 -0.9525) (layer "F.SilkS")
6 | (effects (font (size 0.666496 0.666496) (thickness 0.146304)) (justify left bottom))
7 | (tstamp 6d480cb3-ccbc-4f91-b215-36d9b6b90e39)
8 | )
9 | (fp_text value ">VALUE" (at -1.5875 1.27) (layer "F.Fab")
10 | (effects (font (size 0.36576 0.36576) (thickness 0.04064)) (justify left bottom))
11 | (tstamp 6bb67786-fe79-4530-a8f0-ca53290823df)
12 | )
13 | (fp_poly (pts
14 | (xy -0.1999 0.5001)
15 | (xy 0.1999 0.5001)
16 | (xy 0.1999 -0.5001)
17 | (xy -0.1999 -0.5001)
18 | ) (layer "F.Adhes") (width 0) (fill solid) (tstamp 9e351c4d-f895-49c5-ba3f-cecde3dc6e44))
19 | (fp_line (start 0 -0.508) (end 0 0.508) (layer "F.SilkS") (width 0.2032) (tstamp 629c7bfb-b888-4932-aba0-6916a21e7f67))
20 | (fp_line (start -0.51 0.535) (end 0.51 0.535) (layer "F.Fab") (width 0.1016) (tstamp 22396a4f-3f2f-4a10-9672-ef964a1e15ec))
21 | (fp_line (start -0.51 -0.535) (end 0.51 -0.535) (layer "F.Fab") (width 0.1016) (tstamp 90cacfdf-b07f-4151-ac89-23042124f640))
22 | (fp_poly (pts
23 | (xy 0.4064 0.65)
24 | (xy 1 0.65)
25 | (xy 1 -0.65)
26 | (xy 0.4064 -0.65)
27 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 0138f6cb-7190-4a12-af47-1e018fd27b3c))
28 | (fp_poly (pts
29 | (xy -1 0.65)
30 | (xy -0.4168 0.65)
31 | (xy -0.4168 -0.65)
32 | (xy -1 -0.65)
33 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 637ecbcd-a78f-4c8a-8dcf-472bde2de83b))
34 | (pad "1" smd rect (at -1.016 0) (size 1.2 1.3) (layers "F.Cu" "F.Paste" "F.Mask")
35 | (solder_mask_margin 0.0635) (tstamp bd23358d-4a17-4f52-b69d-122e91d97c44))
36 | (pad "2" smd rect (at 1.016 0) (size 1.2 1.3) (layers "F.Cu" "F.Paste" "F.Mask")
37 | (solder_mask_margin 0.0635) (tstamp 165d5fb4-7aca-4db2-a5bd-306d43842183))
38 | )
39 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO-SWAT-B1.pretty/_0402MP.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "_0402MP" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (descr "0402 MicroPitch
")
5 | (fp_text reference "REF**" (at -0.635 -0.4763) (layer "F.SilkS")
6 | (effects (font (size 0.499872 0.499872) (thickness 0.109728)) (justify left bottom))
7 | (tstamp 66f54e50-362a-4456-a671-e8b742aabfe7)
8 | )
9 | (fp_text value ">VALUE" (at -0.635 0.7938) (layer "F.Fab")
10 | (effects (font (size 0.36576 0.36576) (thickness 0.04064)) (justify left bottom))
11 | (tstamp 7205e05a-db5d-40d5-aa8d-0965b4d6a0a3)
12 | )
13 | (fp_poly (pts
14 | (xy -0.1 0.2)
15 | (xy 0.1 0.2)
16 | (xy 0.1 -0.2)
17 | (xy -0.1 -0.2)
18 | ) (layer "F.Adhes") (width 0) (fill solid) (tstamp 151adedc-3095-4283-bc8b-67b6c834501c))
19 | (fp_line (start 0 -0.127) (end 0 0.127) (layer "F.SilkS") (width 0.2032) (tstamp a31d0c78-4bd5-4839-be72-14af5f3f165d))
20 | (fp_line (start -0.245 -0.174) (end 0.245 -0.174) (layer "F.Fab") (width 0.1016) (tstamp ddaa21a2-edd4-401c-ac76-6f183cf5be3d))
21 | (fp_line (start 0.245 0.174) (end -0.245 0.174) (layer "F.Fab") (width 0.1016) (tstamp ec8c18e2-500a-4935-81c1-76a24c731e63))
22 | (fp_poly (pts
23 | (xy -0.5 0.25)
24 | (xy -0.254 0.25)
25 | (xy -0.254 -0.25)
26 | (xy -0.5 -0.25)
27 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 335257f6-f886-460f-b838-e2d8232128c8))
28 | (fp_poly (pts
29 | (xy 0.2588 0.25)
30 | (xy 0.5 0.25)
31 | (xy 0.5 -0.25)
32 | (xy 0.2588 -0.25)
33 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 3d7cd32b-2bab-4b7c-a3da-482a6d596be7))
34 | (pad "1" smd rect (at -0.508 0) (size 0.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
35 | (solder_mask_margin 0.0635) (tstamp c609a9e6-5647-44af-a743-b732a2a0c37d))
36 | (pad "2" smd rect (at 0.508 0) (size 0.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
37 | (solder_mask_margin 0.0635) (tstamp 1249fd1b-9f93-42c3-bb42-dae4056aa043))
38 | )
39 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO-SWAT-B1.pretty/_0603MP.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "_0603MP" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (descr "0603 MicroPitch")
5 | (fp_text reference "REF**" (at -0.9525 -0.635) (layer "F.SilkS")
6 | (effects (font (size 0.666496 0.666496) (thickness 0.146304)) (justify left bottom))
7 | (tstamp a1f3b960-720c-4050-8c7b-e4fb81f7c447)
8 | )
9 | (fp_text value ">VALUE" (at -0.9525 0.9525) (layer "F.Fab")
10 | (effects (font (size 0.36576 0.36576) (thickness 0.04064)) (justify left bottom))
11 | (tstamp f7454cc9-a5be-454b-b5bb-decc69423e09)
12 | )
13 | (fp_poly (pts
14 | (xy -0.1999 0.25)
15 | (xy 0.1999 0.25)
16 | (xy 0.1999 -0.25)
17 | (xy -0.1999 -0.25)
18 | ) (layer "F.Adhes") (width 0) (fill solid) (tstamp 23d6168b-6030-48a2-96be-111de678cbf9))
19 | (fp_line (start 0 -0.254) (end 0 0.254) (layer "F.SilkS") (width 0.2032) (tstamp ebb6e458-b901-41c0-b269-52de840ade47))
20 | (fp_line (start -0.432 0.306) (end 0.432 0.306) (layer "F.Fab") (width 0.1016) (tstamp 0ff59386-9f8f-4bc5-871b-4804e001e34f))
21 | (fp_line (start 0.432 -0.306) (end -0.432 -0.306) (layer "F.Fab") (width 0.1016) (tstamp c1b693b3-0c6a-47f3-bd85-e73de386676a))
22 | (fp_poly (pts
23 | (xy 0.4318 0.4)
24 | (xy 0.8 0.4)
25 | (xy 0.8 -0.4)
26 | (xy 0.4318 -0.4)
27 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 98d6e8c0-7c85-4056-b142-5a49d5f78f6a))
28 | (fp_poly (pts
29 | (xy -0.8 0.4)
30 | (xy -0.4318 0.4)
31 | (xy -0.4318 -0.4)
32 | (xy -0.8 -0.4)
33 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp c67e1e1d-f03c-4cd2-855a-6f77ed9840d4))
34 | (pad "1" smd rect (at -0.762 0) (size 0.8 0.8) (layers "F.Cu" "F.Paste" "F.Mask")
35 | (solder_mask_margin 0.0635) (tstamp 261178c6-668c-4d25-9316-e97dc5e52e2d))
36 | (pad "2" smd rect (at 0.762 0) (size 0.8 0.8) (layers "F.Cu" "F.Paste" "F.Mask")
37 | (solder_mask_margin 0.0635) (tstamp aece925f-4ef2-4a3b-a64c-72600b766d22))
38 | )
39 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO-SWD.pretty/OSO_SWD_2x3.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "OSO_SWD_2x3" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (attr smd)
5 | (fp_text reference "REF**" (at 0 -2.032 unlocked) (layer "F.SilkS") hide
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | (tstamp cc97765e-03dd-40c8-bc09-9942f8485d23)
8 | )
9 | (fp_text value "OSO_SWD_2x3" (at 0 -4.572 unlocked) (layer "F.Fab")
10 | (effects (font (size 1 1) (thickness 0.15)))
11 | (tstamp 3723f1be-f632-4091-a098-c9348aec63f6)
12 | )
13 | (fp_text user "C" (at -0.508 -0.762 unlocked) (layer "F.SilkS")
14 | (effects (font (size 0.5 0.5) (thickness 0.1)))
15 | (tstamp 88931c8d-237f-4e79-b244-24354b5507cc)
16 | )
17 | (fp_text user "+" (at -0.508 1.778 unlocked) (layer "F.SilkS")
18 | (effects (font (size 0.5 0.5) (thickness 0.1)))
19 | (tstamp b2d594d3-dac9-41e7-b515-19ad22df4cd2)
20 | )
21 | (fp_text user "D" (at 2.032 1.778 unlocked) (layer "F.SilkS")
22 | (effects (font (size 0.5 0.5) (thickness 0.1)))
23 | (tstamp c41801cb-4840-4a63-9b83-a0b86093de8d)
24 | )
25 | (fp_text user "-" (at 2.032 -0.762 unlocked) (layer "F.SilkS")
26 | (effects (font (size 0.5 0.5) (thickness 0.1)))
27 | (tstamp d116e34b-7d96-49fa-980e-61f5adbb5cc2)
28 | )
29 | (fp_text user "~{R}" (at -0.508 -3.302 unlocked) (layer "F.SilkS")
30 | (effects (font (size 0.5 0.5) (thickness 0.1)))
31 | (tstamp e48e1604-d489-45a4-9587-152a042c354a)
32 | )
33 | (fp_text user "${REFERENCE}" (at 0 4.318 unlocked) (layer "F.Fab")
34 | (effects (font (size 1 1) (thickness 0.15)))
35 | (tstamp 3cf253e6-b3d8-4b70-990a-3a9df456d233)
36 | )
37 | (pad "1" smd circle (at 1.27 2.54) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp c93a3c51-b06c-47bc-b2c8-dcd43fd3bce4))
38 | (pad "2" smd circle (at 1.27 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 657a0b8d-9c0a-4efd-920e-1742e80dbd77))
39 | (pad "3" smd circle (at -1.27 2.54) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 110879b7-d820-400e-83c2-2ba83b15a32d))
40 | (pad "4" smd circle (at -1.27 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 0da5021b-2960-4fb1-abd4-df913ada6e37))
41 | (pad "5" smd circle (at -1.27 -2.54) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 5e6b9662-455f-4d0d-8334-3f95b2cc20e1))
42 | )
43 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO-SWD.pretty/OSO_SWD_Linear.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "OSO_SWD_Linear" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (attr smd)
5 | (fp_text reference "REF**" (at 0 -2.032 unlocked) (layer "F.SilkS") hide
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | (tstamp cc97765e-03dd-40c8-bc09-9942f8485d23)
8 | )
9 | (fp_text value "OSO_SWD_Linear" (at 0 -1.5 unlocked) (layer "F.Fab")
10 | (effects (font (size 1 1) (thickness 0.15)))
11 | (tstamp 3723f1be-f632-4091-a098-c9348aec63f6)
12 | )
13 | (fp_text user "SWC" (at 2.54 1.524 unlocked) (layer "F.SilkS")
14 | (effects (font (size 0.5 0.5) (thickness 0.1)))
15 | (tstamp 88931c8d-237f-4e79-b244-24354b5507cc)
16 | )
17 | (fp_text user "3V3" (at 0 1.524 unlocked) (layer "F.SilkS")
18 | (effects (font (size 0.5 0.5) (thickness 0.1)))
19 | (tstamp b2d594d3-dac9-41e7-b515-19ad22df4cd2)
20 | )
21 | (fp_text user "SWD" (at -5.08 1.524 unlocked) (layer "F.SilkS")
22 | (effects (font (size 0.5 0.5) (thickness 0.1)))
23 | (tstamp c41801cb-4840-4a63-9b83-a0b86093de8d)
24 | )
25 | (fp_text user "GND" (at -2.54 1.524 unlocked) (layer "F.SilkS")
26 | (effects (font (size 0.5 0.5) (thickness 0.1)))
27 | (tstamp d116e34b-7d96-49fa-980e-61f5adbb5cc2)
28 | )
29 | (fp_text user "~{RST}" (at 5.08 1.524 unlocked) (layer "F.SilkS")
30 | (effects (font (size 0.5 0.5) (thickness 0.1)))
31 | (tstamp e48e1604-d489-45a4-9587-152a042c354a)
32 | )
33 | (fp_text user "${REFERENCE}" (at 0 3.048 unlocked) (layer "F.Fab")
34 | (effects (font (size 1 1) (thickness 0.15)))
35 | (tstamp 3cf253e6-b3d8-4b70-990a-3a9df456d233)
36 | )
37 | (pad "1" smd circle (at -5.08 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp c93a3c51-b06c-47bc-b2c8-dcd43fd3bce4))
38 | (pad "2" smd circle (at -2.54 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 657a0b8d-9c0a-4efd-920e-1742e80dbd77))
39 | (pad "3" smd circle (at 0 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 110879b7-d820-400e-83c2-2ba83b15a32d))
40 | (pad "4" smd circle (at 2.54 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 0da5021b-2960-4fb1-abd4-df913ada6e37))
41 | (pad "5" smd circle (at 5.08 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 5e6b9662-455f-4d0d-8334-3f95b2cc20e1))
42 | )
43 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/OSO_SWD.kicad_sym:
--------------------------------------------------------------------------------
1 | (kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
2 | (symbol "OSO_SWD" (in_bom yes) (on_board yes)
3 | (property "Reference" "J" (id 0) (at 0 -7.62 0)
4 | (effects (font (size 1.27 1.27)))
5 | )
6 | (property "Value" "OSO_SWD" (id 1) (at 0 7.62 0)
7 | (effects (font (size 1.27 1.27)))
8 | )
9 | (property "Footprint" "" (id 2) (at 0 0 0)
10 | (effects (font (size 1.27 1.27)) hide)
11 | )
12 | (property "Datasheet" "" (id 3) (at 0 0 0)
13 | (effects (font (size 1.27 1.27)) hide)
14 | )
15 | (symbol "OSO_SWD_0_1"
16 | (rectangle (start -5.08 6.35) (end 5.08 -6.35)
17 | (stroke (width 0) (type default) (color 0 0 0 0))
18 | (fill (type background))
19 | )
20 | )
21 | (symbol "OSO_SWD_1_1"
22 | (pin bidirectional line (at -7.62 5.08 0) (length 2.54)
23 | (name "SWDIO" (effects (font (size 1.27 1.27))))
24 | (number "1" (effects (font (size 1.27 1.27))))
25 | )
26 | (pin power_in line (at -7.62 2.54 0) (length 2.54)
27 | (name "GND" (effects (font (size 1.27 1.27))))
28 | (number "2" (effects (font (size 1.27 1.27))))
29 | )
30 | (pin power_in line (at -7.62 0 0) (length 2.54)
31 | (name "VCC" (effects (font (size 1.27 1.27))))
32 | (number "3" (effects (font (size 1.27 1.27))))
33 | )
34 | (pin bidirectional line (at -7.62 -2.54 0) (length 2.54)
35 | (name "SWCLK" (effects (font (size 1.27 1.27))))
36 | (number "4" (effects (font (size 1.27 1.27))))
37 | )
38 | (pin bidirectional line (at -7.62 -5.08 0) (length 2.54)
39 | (name "~{RESET}" (effects (font (size 1.27 1.27))))
40 | (number "5" (effects (font (size 1.27 1.27))))
41 | )
42 | )
43 | )
44 | )
45 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/empty.kicad_wks:
--------------------------------------------------------------------------------
1 | (kicad_wks (version 20210606) (generator pl_editor)
2 | (setup (textsize 1.5 1.5)(linewidth 0.15)(textlinewidth 0.15)
3 | (left_margin 10)(right_margin 10)(top_margin 10)(bottom_margin 10))
4 | (line (name "segm1:Line") (start 0 0) (end 0 0))
5 | )
6 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (lib (name "OSO-SWAT-A1-05")(type "KiCad")(uri "$(KIPRJMOD)/OSO-SWAT-B1.pretty")(options "")(descr ""))
3 | (lib (name "OSO-SWD")(type "KiCad")(uri "${KIPRJMOD}/OSO-SWD.pretty")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-B1/sym-lib-table:
--------------------------------------------------------------------------------
1 | (sym_lib_table
2 | (lib (name "OSO-SWAT-A1-05-eagle-import")(type "KiCad")(uri "${KIPRJMOD}/OSO-SWAT-A1-05-eagle-import.kicad_sym")(options "")(descr ""))
3 | (lib (name "OSO-SWD")(type "KiCad")(uri "${KIPRJMOD}/OSO_SWD.kicad_sym")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1-06.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1-06.zip
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1-rounded.kicad_prl:
--------------------------------------------------------------------------------
1 | {
2 | "board": {
3 | "active_layer": 31,
4 | "active_layer_preset": "",
5 | "auto_track_width": true,
6 | "hidden_netclasses": [],
7 | "hidden_nets": [],
8 | "high_contrast_mode": 0,
9 | "net_color_mode": 1,
10 | "opacity": {
11 | "images": 0.6,
12 | "pads": 1.0,
13 | "tracks": 1.0,
14 | "vias": 1.0,
15 | "zones": 0.6
16 | },
17 | "ratsnest_display_mode": 0,
18 | "selection_filter": {
19 | "dimensions": true,
20 | "footprints": true,
21 | "graphics": true,
22 | "keepouts": true,
23 | "lockedItems": true,
24 | "otherItems": true,
25 | "pads": true,
26 | "text": true,
27 | "tracks": true,
28 | "vias": true,
29 | "zones": true
30 | },
31 | "visible_items": [
32 | 0,
33 | 1,
34 | 2,
35 | 3,
36 | 4,
37 | 5,
38 | 8,
39 | 9,
40 | 10,
41 | 11,
42 | 12,
43 | 13,
44 | 14,
45 | 15,
46 | 16,
47 | 17,
48 | 18,
49 | 19,
50 | 20,
51 | 21,
52 | 22,
53 | 23,
54 | 24,
55 | 25,
56 | 26,
57 | 27,
58 | 28,
59 | 29,
60 | 30,
61 | 32,
62 | 33,
63 | 34,
64 | 35,
65 | 36
66 | ],
67 | "visible_layers": "00290aa_80000007",
68 | "zone_display_mode": 0
69 | },
70 | "git": {
71 | "repo_password": "",
72 | "repo_type": "",
73 | "repo_username": "",
74 | "ssh_key": ""
75 | },
76 | "meta": {
77 | "filename": "OSO-SWAT-C1-rounded.kicad_prl",
78 | "version": 3
79 | },
80 | "project": {
81 | "files": []
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1.kicad_dru:
--------------------------------------------------------------------------------
1 | (version 1)
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1.kicad_prl:
--------------------------------------------------------------------------------
1 | {
2 | "board": {
3 | "active_layer": 0,
4 | "active_layer_preset": "",
5 | "auto_track_width": true,
6 | "hidden_netclasses": [],
7 | "hidden_nets": [],
8 | "high_contrast_mode": 0,
9 | "net_color_mode": 1,
10 | "opacity": {
11 | "images": 0.6,
12 | "pads": 1.0,
13 | "tracks": 1.0,
14 | "vias": 1.0,
15 | "zones": 0.6
16 | },
17 | "ratsnest_display_mode": 0,
18 | "selection_filter": {
19 | "dimensions": true,
20 | "footprints": true,
21 | "graphics": true,
22 | "keepouts": true,
23 | "lockedItems": true,
24 | "otherItems": true,
25 | "pads": true,
26 | "text": true,
27 | "tracks": true,
28 | "vias": true,
29 | "zones": true
30 | },
31 | "visible_items": [
32 | 0,
33 | 1,
34 | 2,
35 | 3,
36 | 4,
37 | 5,
38 | 8,
39 | 9,
40 | 10,
41 | 11,
42 | 12,
43 | 13,
44 | 14,
45 | 15,
46 | 16,
47 | 17,
48 | 18,
49 | 19,
50 | 20,
51 | 21,
52 | 22,
53 | 23,
54 | 24,
55 | 25,
56 | 26,
57 | 27,
58 | 28,
59 | 29,
60 | 30,
61 | 32,
62 | 33,
63 | 34,
64 | 35,
65 | 36
66 | ],
67 | "visible_layers": "0015055_80000001",
68 | "zone_display_mode": 0
69 | },
70 | "git": {
71 | "repo_password": "",
72 | "repo_type": "",
73 | "repo_username": "",
74 | "ssh_key": ""
75 | },
76 | "meta": {
77 | "filename": "OSO-SWAT-C1.kicad_prl",
78 | "version": 3
79 | },
80 | "project": {
81 | "files": []
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1.pretty/FIDUCIAL_1MM.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "FIDUCIAL_1MM" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (fp_text reference "REF**" (at 0 0) (layer "F.SilkS")
5 | (effects (font (size 1.27 1.27) (thickness 0.15)))
6 | (tstamp 084b231a-a841-4989-ba78-c80f52a1d530)
7 | )
8 | (fp_text value "" (at 0 0) (layer "F.Fab")
9 | (effects (font (size 1.27 1.27) (thickness 0.15)))
10 | (tstamp 5023af4a-f69e-458d-abff-77e97f0c49aa)
11 | )
12 | (fp_arc (start -0.75 0) (mid -0.53033 -0.53033) (end 0 -0.75) (layer "F.Mask") (width 0.5) (tstamp 243424d9-367c-4c55-9ce2-5c7f6b71c486))
13 | (fp_arc (start 0 0.75) (mid -0.53033 0.53033) (end -0.75 0) (layer "F.Mask") (width 0.5) (tstamp 38a261de-e7ad-4359-9a4e-e8325d947b3c))
14 | (fp_arc (start 0.75 0) (mid 0.53033 0.53033) (end 0 0.75) (layer "F.Mask") (width 0.5) (tstamp 3e5e4d91-af7b-467f-93be-7757d59f4acd))
15 | (fp_arc (start 0 -0.75) (mid 0.53033 -0.53033) (end 0.75 0) (layer "F.Mask") (width 0.5) (tstamp cba0161e-94ca-4df5-83f4-b38d910a40d8))
16 | (fp_arc (start 0 -0.75) (mid 0.53033 -0.53033) (end 0.75 0) (layer "F.CrtYd") (width 0.5) (tstamp 24375f2d-9f3c-47f3-bf1b-d9abc9459487))
17 | (fp_arc (start 0.75 0) (mid 0.53033 0.53033) (end 0 0.75) (layer "F.CrtYd") (width 0.5) (tstamp 61d35d35-c7e3-45c7-a1f6-4c560b28917a))
18 | (fp_arc (start 0 0.75) (mid -0.53033 0.53033) (end -0.75 0) (layer "F.CrtYd") (width 0.5) (tstamp b245f192-3aeb-4a3c-8f5f-5b2ac372cfb6))
19 | (fp_arc (start -0.75 0) (mid -0.53033 -0.53033) (end 0 -0.75) (layer "F.CrtYd") (width 0.5) (tstamp f012c0d9-2bab-4b5b-8327-ed4e32f900bb))
20 | (pad "1" smd roundrect (at 0 0) (size 1 1) (layers "F.Cu" "F.Mask") (roundrect_rratio 0.5)
21 | (solder_mask_margin 0.0635) (tstamp ea46b6d0-c0be-44d4-aa82-47c56ffdb259))
22 | )
23 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1.pretty/LED_QBLP655.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "LED_QBLP655" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (fp_text reference "REF**" (at 0.011609 -1.462631) (layer "F.SilkS")
5 | (effects (font (size 0.682286 0.682286) (thickness 0.14977)))
6 | (tstamp 441c2b28-158a-4d68-a991-31f4c6a03554)
7 | )
8 | (fp_text value ">VALUE" (at -0.054931 1.580818) (layer "F.Fab")
9 | (effects (font (size 0.677435 0.677435) (thickness 0.148705)))
10 | (tstamp 2f361345-03db-4c21-a99d-0b9cfab62aee)
11 | )
12 | (fp_circle (center -3.1 -0.5) (end -3 -0.5) (layer "F.SilkS") (width 0.2) (fill none) (tstamp 0ba68dd4-e618-4da0-b7e7-599817b38c08))
13 | (fp_line (start -1.6 -0.6) (end 1.6 -0.6) (layer "F.Fab") (width 0.127) (tstamp 3629e8ab-0a05-463c-9cb0-81d2e314e044))
14 | (fp_line (start -1.6 0.6) (end -1.6 -0.6) (layer "F.Fab") (width 0.127) (tstamp 379a3f23-154c-4da8-9d91-714d85fa6b82))
15 | (fp_line (start 1.6 -0.6) (end 1.6 0.6) (layer "F.Fab") (width 0.127) (tstamp 78db06e4-b90e-45d6-90ee-f31a25c04c7d))
16 | (fp_line (start 1.6 0.6) (end -1.6 0.6) (layer "F.Fab") (width 0.127) (tstamp de669889-6aee-41d8-9167-24b5b7cd2f7a))
17 | (fp_circle (center -3.1 -0.5) (end -3 -0.5) (layer "F.Fab") (width 0.2) (fill none) (tstamp a3f31f15-16ea-4248-8fe2-4f1f6cb6fef0))
18 | (pad "1" smd rect (at -1.5 -0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
19 | (solder_mask_margin 0.0635) (tstamp c0b010da-7837-47db-be16-93e46d77ee03))
20 | (pad "2" smd rect (at 1.5 -0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
21 | (solder_mask_margin 0.0635) (tstamp 0491e5ac-92c6-4da4-a40f-13768f4f5f7c))
22 | (pad "3" smd rect (at -1.5 0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
23 | (solder_mask_margin 0.0635) (tstamp d96a3b29-ffbb-4252-a695-34388cf2cce8))
24 | (pad "4" smd rect (at 1.5 0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
25 | (solder_mask_margin 0.0635) (tstamp a7b3dfda-cc06-4a25-8ceb-15247a6b386b))
26 | )
27 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1.pretty/LED_QBLP655_RGB.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "LED_QBLP655_RGB" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (fp_text reference "REF**" (at 0.011609 -1.462631) (layer "F.SilkS")
5 | (effects (font (size 0.682286 0.682286) (thickness 0.14977)))
6 | (tstamp 441c2b28-158a-4d68-a991-31f4c6a03554)
7 | )
8 | (fp_text value ">VALUE" (at -0.054931 1.580818) (layer "F.Fab")
9 | (effects (font (size 0.677435 0.677435) (thickness 0.148705)))
10 | (tstamp 2f361345-03db-4c21-a99d-0b9cfab62aee)
11 | )
12 | (fp_line (start -1.6 -0.6) (end 1.6 -0.6) (layer "F.Fab") (width 0.127) (tstamp 3629e8ab-0a05-463c-9cb0-81d2e314e044))
13 | (fp_line (start -1.6 0.6) (end -1.6 -0.6) (layer "F.Fab") (width 0.127) (tstamp 379a3f23-154c-4da8-9d91-714d85fa6b82))
14 | (fp_line (start 1.6 -0.6) (end 1.6 0.6) (layer "F.Fab") (width 0.127) (tstamp 78db06e4-b90e-45d6-90ee-f31a25c04c7d))
15 | (fp_line (start 1.6 0.6) (end -1.6 0.6) (layer "F.Fab") (width 0.127) (tstamp de669889-6aee-41d8-9167-24b5b7cd2f7a))
16 | (pad "1" smd rect (at 1.5 -0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
17 | (solder_mask_margin 0.0635) (tstamp 0491e5ac-92c6-4da4-a40f-13768f4f5f7c))
18 | (pad "2" smd rect (at -1.5 -0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
19 | (solder_mask_margin 0.0635) (tstamp c0b010da-7837-47db-be16-93e46d77ee03))
20 | (pad "3" smd rect (at -1.5 0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
21 | (solder_mask_margin 0.0635) (tstamp d96a3b29-ffbb-4252-a695-34388cf2cce8))
22 | (pad "4" smd rect (at 1.5 0.4) (size 1.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
23 | (solder_mask_margin 0.0635) (tstamp a7b3dfda-cc06-4a25-8ceb-15247a6b386b))
24 | )
25 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1.pretty/MICROBUILDER_TESTPOINT_ROUND_1.5MM.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "MICROBUILDER_TESTPOINT_ROUND_1.5MM" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (fp_text reference "REF**" (at 1.143 0.127) (layer "F.SilkS")
5 | (effects (font (size 0.666496 0.666496) (thickness 0.146304)) (justify left bottom))
6 | (tstamp 3249263f-d424-465a-883e-c9fbfca1c498)
7 | )
8 | (fp_text value ">VALUE" (at 1.143 0.635) (layer "F.Fab")
9 | (effects (font (size 0.36576 0.36576) (thickness 0.04064)) (justify left bottom))
10 | (tstamp ffe18277-47dd-48a9-ae75-8daae098595b)
11 | )
12 | (fp_circle (center 0 0) (end 1 0) (layer "F.SilkS") (width 0.2032) (fill none) (tstamp 10aeb60f-0687-4840-aeb5-a5e914b89db2))
13 | (pad "P$1" smd roundrect (at 0 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (roundrect_rratio 0.5)
14 | (solder_mask_margin 0.0635) (tstamp 278b13e7-2a43-4fc5-a675-ea6ed2efdd4b))
15 | )
16 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1.pretty/MICROBUILDER__0805MP.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "MICROBUILDER__0805MP" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (descr "0805 MicroPitch")
5 | (fp_text reference "REF**" (at -1.5875 -0.9525) (layer "F.SilkS")
6 | (effects (font (size 0.666496 0.666496) (thickness 0.146304)) (justify left bottom))
7 | (tstamp 6d480cb3-ccbc-4f91-b215-36d9b6b90e39)
8 | )
9 | (fp_text value ">VALUE" (at -1.5875 1.27) (layer "F.Fab")
10 | (effects (font (size 0.36576 0.36576) (thickness 0.04064)) (justify left bottom))
11 | (tstamp 6bb67786-fe79-4530-a8f0-ca53290823df)
12 | )
13 | (fp_poly (pts
14 | (xy -0.1999 0.5001)
15 | (xy 0.1999 0.5001)
16 | (xy 0.1999 -0.5001)
17 | (xy -0.1999 -0.5001)
18 | ) (layer "F.Adhes") (width 0) (fill solid) (tstamp 9e351c4d-f895-49c5-ba3f-cecde3dc6e44))
19 | (fp_line (start 0 -0.508) (end 0 0.508) (layer "F.SilkS") (width 0.2032) (tstamp 629c7bfb-b888-4932-aba0-6916a21e7f67))
20 | (fp_line (start -0.51 0.535) (end 0.51 0.535) (layer "F.Fab") (width 0.1016) (tstamp 22396a4f-3f2f-4a10-9672-ef964a1e15ec))
21 | (fp_line (start -0.51 -0.535) (end 0.51 -0.535) (layer "F.Fab") (width 0.1016) (tstamp 90cacfdf-b07f-4151-ac89-23042124f640))
22 | (fp_poly (pts
23 | (xy 0.4064 0.65)
24 | (xy 1 0.65)
25 | (xy 1 -0.65)
26 | (xy 0.4064 -0.65)
27 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 0138f6cb-7190-4a12-af47-1e018fd27b3c))
28 | (fp_poly (pts
29 | (xy -1 0.65)
30 | (xy -0.4168 0.65)
31 | (xy -0.4168 -0.65)
32 | (xy -1 -0.65)
33 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 637ecbcd-a78f-4c8a-8dcf-472bde2de83b))
34 | (pad "1" smd rect (at -1.016 0) (size 1.2 1.3) (layers "F.Cu" "F.Paste" "F.Mask")
35 | (solder_mask_margin 0.0635) (tstamp bd23358d-4a17-4f52-b69d-122e91d97c44))
36 | (pad "2" smd rect (at 1.016 0) (size 1.2 1.3) (layers "F.Cu" "F.Paste" "F.Mask")
37 | (solder_mask_margin 0.0635) (tstamp 165d5fb4-7aca-4db2-a5bd-306d43842183))
38 | )
39 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1.pretty/_0402MP.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "_0402MP" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (descr "0402 MicroPitch
")
5 | (fp_text reference "REF**" (at -0.635 -0.4763) (layer "F.SilkS")
6 | (effects (font (size 0.499872 0.499872) (thickness 0.109728)) (justify left bottom))
7 | (tstamp 66f54e50-362a-4456-a671-e8b742aabfe7)
8 | )
9 | (fp_text value ">VALUE" (at -0.635 0.7938) (layer "F.Fab")
10 | (effects (font (size 0.36576 0.36576) (thickness 0.04064)) (justify left bottom))
11 | (tstamp 7205e05a-db5d-40d5-aa8d-0965b4d6a0a3)
12 | )
13 | (fp_poly (pts
14 | (xy -0.1 0.2)
15 | (xy 0.1 0.2)
16 | (xy 0.1 -0.2)
17 | (xy -0.1 -0.2)
18 | ) (layer "F.Adhes") (width 0) (fill solid) (tstamp 151adedc-3095-4283-bc8b-67b6c834501c))
19 | (fp_line (start 0 -0.127) (end 0 0.127) (layer "F.SilkS") (width 0.2032) (tstamp a31d0c78-4bd5-4839-be72-14af5f3f165d))
20 | (fp_line (start -0.245 -0.174) (end 0.245 -0.174) (layer "F.Fab") (width 0.1016) (tstamp ddaa21a2-edd4-401c-ac76-6f183cf5be3d))
21 | (fp_line (start 0.245 0.174) (end -0.245 0.174) (layer "F.Fab") (width 0.1016) (tstamp ec8c18e2-500a-4935-81c1-76a24c731e63))
22 | (fp_poly (pts
23 | (xy -0.5 0.25)
24 | (xy -0.254 0.25)
25 | (xy -0.254 -0.25)
26 | (xy -0.5 -0.25)
27 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 335257f6-f886-460f-b838-e2d8232128c8))
28 | (fp_poly (pts
29 | (xy 0.2588 0.25)
30 | (xy 0.5 0.25)
31 | (xy 0.5 -0.25)
32 | (xy 0.2588 -0.25)
33 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 3d7cd32b-2bab-4b7c-a3da-482a6d596be7))
34 | (pad "1" smd rect (at -0.508 0) (size 0.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
35 | (solder_mask_margin 0.0635) (tstamp c609a9e6-5647-44af-a743-b732a2a0c37d))
36 | (pad "2" smd rect (at 0.508 0) (size 0.5 0.5) (layers "F.Cu" "F.Paste" "F.Mask")
37 | (solder_mask_margin 0.0635) (tstamp 1249fd1b-9f93-42c3-bb42-dae4056aa043))
38 | )
39 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1.pretty/_0603MP.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "_0603MP" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (descr "0603 MicroPitch")
5 | (fp_text reference "REF**" (at -0.9525 -0.635) (layer "F.SilkS")
6 | (effects (font (size 0.666496 0.666496) (thickness 0.146304)) (justify left bottom))
7 | (tstamp a1f3b960-720c-4050-8c7b-e4fb81f7c447)
8 | )
9 | (fp_text value ">VALUE" (at -0.9525 0.9525) (layer "F.Fab")
10 | (effects (font (size 0.36576 0.36576) (thickness 0.04064)) (justify left bottom))
11 | (tstamp f7454cc9-a5be-454b-b5bb-decc69423e09)
12 | )
13 | (fp_poly (pts
14 | (xy -0.1999 0.25)
15 | (xy 0.1999 0.25)
16 | (xy 0.1999 -0.25)
17 | (xy -0.1999 -0.25)
18 | ) (layer "F.Adhes") (width 0) (fill solid) (tstamp 23d6168b-6030-48a2-96be-111de678cbf9))
19 | (fp_line (start 0 -0.254) (end 0 0.254) (layer "F.SilkS") (width 0.2032) (tstamp ebb6e458-b901-41c0-b269-52de840ade47))
20 | (fp_line (start -0.432 0.306) (end 0.432 0.306) (layer "F.Fab") (width 0.1016) (tstamp 0ff59386-9f8f-4bc5-871b-4804e001e34f))
21 | (fp_line (start 0.432 -0.306) (end -0.432 -0.306) (layer "F.Fab") (width 0.1016) (tstamp c1b693b3-0c6a-47f3-bd85-e73de386676a))
22 | (fp_poly (pts
23 | (xy 0.4318 0.4)
24 | (xy 0.8 0.4)
25 | (xy 0.8 -0.4)
26 | (xy 0.4318 -0.4)
27 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 98d6e8c0-7c85-4056-b142-5a49d5f78f6a))
28 | (fp_poly (pts
29 | (xy -0.8 0.4)
30 | (xy -0.4318 0.4)
31 | (xy -0.4318 -0.4)
32 | (xy -0.8 -0.4)
33 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp c67e1e1d-f03c-4cd2-855a-6f77ed9840d4))
34 | (pad "1" smd rect (at -0.762 0) (size 0.8 0.8) (layers "F.Cu" "F.Paste" "F.Mask")
35 | (solder_mask_margin 0.0635) (tstamp 261178c6-668c-4d25-9316-e97dc5e52e2d))
36 | (pad "2" smd rect (at 0.762 0) (size 0.8 0.8) (layers "F.Cu" "F.Paste" "F.Mask")
37 | (solder_mask_margin 0.0635) (tstamp aece925f-4ef2-4a3b-a64c-72600b766d22))
38 | )
39 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWAT-C1.round-tracks-config:
--------------------------------------------------------------------------------
1 | Default True 2.0 3
2 | gnd True 2.0 3
3 | power True 2.0 3
4 | True True False
5 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWD.pretty/OSO_SWD_2x3.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "OSO_SWD_2x3" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (attr smd)
5 | (fp_text reference "REF**" (at 0 -2.032 unlocked) (layer "F.SilkS") hide
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | (tstamp cc97765e-03dd-40c8-bc09-9942f8485d23)
8 | )
9 | (fp_text value "OSO_SWD_2x3" (at 0 -4.572 unlocked) (layer "F.Fab")
10 | (effects (font (size 1 1) (thickness 0.15)))
11 | (tstamp 3723f1be-f632-4091-a098-c9348aec63f6)
12 | )
13 | (fp_text user "C" (at -0.508 -0.762 unlocked) (layer "F.SilkS")
14 | (effects (font (size 0.5 0.5) (thickness 0.1)))
15 | (tstamp 88931c8d-237f-4e79-b244-24354b5507cc)
16 | )
17 | (fp_text user "+" (at -0.508 1.778 unlocked) (layer "F.SilkS")
18 | (effects (font (size 0.5 0.5) (thickness 0.1)))
19 | (tstamp b2d594d3-dac9-41e7-b515-19ad22df4cd2)
20 | )
21 | (fp_text user "D" (at 2.032 1.778 unlocked) (layer "F.SilkS")
22 | (effects (font (size 0.5 0.5) (thickness 0.1)))
23 | (tstamp c41801cb-4840-4a63-9b83-a0b86093de8d)
24 | )
25 | (fp_text user "-" (at 2.032 -0.762 unlocked) (layer "F.SilkS")
26 | (effects (font (size 0.5 0.5) (thickness 0.1)))
27 | (tstamp d116e34b-7d96-49fa-980e-61f5adbb5cc2)
28 | )
29 | (fp_text user "~{R}" (at -0.508 -3.302 unlocked) (layer "F.SilkS")
30 | (effects (font (size 0.5 0.5) (thickness 0.1)))
31 | (tstamp e48e1604-d489-45a4-9587-152a042c354a)
32 | )
33 | (fp_text user "${REFERENCE}" (at 0 4.318 unlocked) (layer "F.Fab")
34 | (effects (font (size 1 1) (thickness 0.15)))
35 | (tstamp 3cf253e6-b3d8-4b70-990a-3a9df456d233)
36 | )
37 | (pad "1" smd circle (at 1.27 2.54) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp c93a3c51-b06c-47bc-b2c8-dcd43fd3bce4))
38 | (pad "2" smd circle (at 1.27 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 657a0b8d-9c0a-4efd-920e-1742e80dbd77))
39 | (pad "3" smd circle (at -1.27 2.54) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 110879b7-d820-400e-83c2-2ba83b15a32d))
40 | (pad "4" smd circle (at -1.27 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 0da5021b-2960-4fb1-abd4-df913ada6e37))
41 | (pad "5" smd circle (at -1.27 -2.54) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 5e6b9662-455f-4d0d-8334-3f95b2cc20e1))
42 | )
43 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO-SWD.pretty/OSO_SWD_Linear.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "OSO_SWD_Linear" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (attr smd)
5 | (fp_text reference "REF**" (at 0 -2.032 unlocked) (layer "F.SilkS") hide
6 | (effects (font (size 1 1) (thickness 0.15)))
7 | (tstamp cc97765e-03dd-40c8-bc09-9942f8485d23)
8 | )
9 | (fp_text value "OSO_SWD_Linear" (at 0 -1.5 unlocked) (layer "F.Fab")
10 | (effects (font (size 1 1) (thickness 0.15)))
11 | (tstamp 3723f1be-f632-4091-a098-c9348aec63f6)
12 | )
13 | (fp_text user "SWC" (at 2.54 1.524 unlocked) (layer "F.SilkS")
14 | (effects (font (size 0.5 0.5) (thickness 0.1)))
15 | (tstamp 88931c8d-237f-4e79-b244-24354b5507cc)
16 | )
17 | (fp_text user "3V3" (at 0 1.524 unlocked) (layer "F.SilkS")
18 | (effects (font (size 0.5 0.5) (thickness 0.1)))
19 | (tstamp b2d594d3-dac9-41e7-b515-19ad22df4cd2)
20 | )
21 | (fp_text user "SWD" (at -5.08 1.524 unlocked) (layer "F.SilkS")
22 | (effects (font (size 0.5 0.5) (thickness 0.1)))
23 | (tstamp c41801cb-4840-4a63-9b83-a0b86093de8d)
24 | )
25 | (fp_text user "GND" (at -2.54 1.524 unlocked) (layer "F.SilkS")
26 | (effects (font (size 0.5 0.5) (thickness 0.1)))
27 | (tstamp d116e34b-7d96-49fa-980e-61f5adbb5cc2)
28 | )
29 | (fp_text user "~{RST}" (at 5.08 1.524 unlocked) (layer "F.SilkS")
30 | (effects (font (size 0.5 0.5) (thickness 0.1)))
31 | (tstamp e48e1604-d489-45a4-9587-152a042c354a)
32 | )
33 | (fp_text user "${REFERENCE}" (at 0 3.048 unlocked) (layer "F.Fab")
34 | (effects (font (size 1 1) (thickness 0.15)))
35 | (tstamp 3cf253e6-b3d8-4b70-990a-3a9df456d233)
36 | )
37 | (pad "1" smd circle (at -5.08 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp c93a3c51-b06c-47bc-b2c8-dcd43fd3bce4))
38 | (pad "2" smd circle (at -2.54 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 657a0b8d-9c0a-4efd-920e-1742e80dbd77))
39 | (pad "3" smd circle (at 0 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 110879b7-d820-400e-83c2-2ba83b15a32d))
40 | (pad "4" smd circle (at 2.54 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 0da5021b-2960-4fb1-abd4-df913ada6e37))
41 | (pad "5" smd circle (at 5.08 0) (size 1.5 1.5) (layers "F.Cu" "F.Mask") (tstamp 5e6b9662-455f-4d0d-8334-3f95b2cc20e1))
42 | )
43 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/OSO_SWD.kicad_sym:
--------------------------------------------------------------------------------
1 | (kicad_symbol_lib (version 20211014) (generator kicad_symbol_editor)
2 | (symbol "OSO_SWD" (in_bom yes) (on_board yes)
3 | (property "Reference" "J" (id 0) (at 0 -7.62 0)
4 | (effects (font (size 1.27 1.27)))
5 | )
6 | (property "Value" "OSO_SWD" (id 1) (at 0 7.62 0)
7 | (effects (font (size 1.27 1.27)))
8 | )
9 | (property "Footprint" "" (id 2) (at 0 0 0)
10 | (effects (font (size 1.27 1.27)) hide)
11 | )
12 | (property "Datasheet" "" (id 3) (at 0 0 0)
13 | (effects (font (size 1.27 1.27)) hide)
14 | )
15 | (symbol "OSO_SWD_0_1"
16 | (rectangle (start -5.08 6.35) (end 5.08 -6.35)
17 | (stroke (width 0) (type default) (color 0 0 0 0))
18 | (fill (type background))
19 | )
20 | )
21 | (symbol "OSO_SWD_1_1"
22 | (pin bidirectional line (at -7.62 5.08 0) (length 2.54)
23 | (name "SWDIO" (effects (font (size 1.27 1.27))))
24 | (number "1" (effects (font (size 1.27 1.27))))
25 | )
26 | (pin power_in line (at -7.62 2.54 0) (length 2.54)
27 | (name "GND" (effects (font (size 1.27 1.27))))
28 | (number "2" (effects (font (size 1.27 1.27))))
29 | )
30 | (pin power_in line (at -7.62 0 0) (length 2.54)
31 | (name "VCC" (effects (font (size 1.27 1.27))))
32 | (number "3" (effects (font (size 1.27 1.27))))
33 | )
34 | (pin bidirectional line (at -7.62 -2.54 0) (length 2.54)
35 | (name "SWCLK" (effects (font (size 1.27 1.27))))
36 | (number "4" (effects (font (size 1.27 1.27))))
37 | )
38 | (pin bidirectional line (at -7.62 -5.08 0) (length 2.54)
39 | (name "~{RESET}" (effects (font (size 1.27 1.27))))
40 | (number "5" (effects (font (size 1.27 1.27))))
41 | )
42 | )
43 | )
44 | )
45 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/empty.kicad_wks:
--------------------------------------------------------------------------------
1 | (kicad_wks (version 20210606) (generator pl_editor)
2 | (setup (textsize 1.5 1.5)(linewidth 0.15)(textlinewidth 0.15)
3 | (left_margin 10)(right_margin 10)(top_margin 10)(bottom_margin 10))
4 | (line (name "segm1:Line") (start 0 0) (end 0 0))
5 | )
6 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (lib (name "OSO-SWAT-A1-05")(type "KiCad")(uri "$(KIPRJMOD)/OSO-SWAT-C1.pretty")(options "")(descr ""))
3 | (lib (name "OSO-SWD")(type "KiCad")(uri "${KIPRJMOD}/OSO-SWD.pretty")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/PCB/Main Boards/OSO-SWAT-C1/sym-lib-table:
--------------------------------------------------------------------------------
1 | (sym_lib_table
2 | (lib (name "OSO-SWAT-A1-05-eagle-import")(type "KiCad")(uri "${KIPRJMOD}/OSO-SWAT-A1-05-eagle-import.kicad_sym")(options "")(descr ""))
3 | (lib (name "OSO-SWD")(type "KiCad")(uri "${KIPRJMOD}/OSO_SWD.kicad_sym")(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Gerbers/OSO-SWAB-A1-00 Temperature + Test Points_2022-01-26.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/PCB/Sensor Boards/Gerbers/OSO-SWAB-A1-00 Temperature + Test Points_2022-01-26.zip
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Kicad/OSO-SWAB-B1-00 Sensor Watch Accelerometer/OSO-SWAB-B1-00 Sensor Watch Accelerometer.kicad_dru:
--------------------------------------------------------------------------------
1 | (version 1)
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Kicad/OSO-SWAB-B1-00 Sensor Watch Accelerometer/OSO-SWAB-B1-00 Sensor Watch Accelerometer.kicad_prl:
--------------------------------------------------------------------------------
1 | {
2 | "board": {
3 | "active_layer": 39,
4 | "active_layer_preset": "All Layers",
5 | "auto_track_width": true,
6 | "hidden_netclasses": [],
7 | "hidden_nets": [],
8 | "high_contrast_mode": 0,
9 | "net_color_mode": 1,
10 | "opacity": {
11 | "images": 0.6,
12 | "pads": 1.0,
13 | "tracks": 1.0,
14 | "vias": 1.0,
15 | "zones": 0.6
16 | },
17 | "ratsnest_display_mode": 0,
18 | "selection_filter": {
19 | "dimensions": true,
20 | "footprints": true,
21 | "graphics": true,
22 | "keepouts": true,
23 | "lockedItems": true,
24 | "otherItems": true,
25 | "pads": true,
26 | "text": true,
27 | "tracks": true,
28 | "vias": true,
29 | "zones": true
30 | },
31 | "visible_items": [
32 | 0,
33 | 1,
34 | 2,
35 | 3,
36 | 4,
37 | 5,
38 | 8,
39 | 9,
40 | 10,
41 | 11,
42 | 12,
43 | 13,
44 | 14,
45 | 15,
46 | 16,
47 | 17,
48 | 18,
49 | 19,
50 | 20,
51 | 21,
52 | 22,
53 | 23,
54 | 24,
55 | 25,
56 | 26,
57 | 27,
58 | 28,
59 | 29,
60 | 30,
61 | 32,
62 | 33,
63 | 34,
64 | 35,
65 | 36
66 | ],
67 | "visible_layers": "fffffff_ffffffff",
68 | "zone_display_mode": 0
69 | },
70 | "meta": {
71 | "filename": "OSO-SWAB-B1-00 Sensor Watch Accelerometer.kicad_prl",
72 | "version": 3
73 | },
74 | "project": {
75 | "files": []
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Kicad/OSO-SWAB-B1-00 Sensor Watch Accelerometer/OSO-SWAB-B1-00 Sensor Watch Accelerometer.pretty/B1,27.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "B1,27" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (descr "TEST PAD")
5 | (fp_text reference "REF**" (at -0.635 -1.016) (layer "F.SilkS")
6 | (effects (font (size 1.143 1.143) (thickness 0.127)) (justify left bottom))
7 | (tstamp 66611b0e-db6e-4021-9427-c32ecc053115)
8 | )
9 | (fp_text value ">VALUE" (at -0.635 0.762) (layer "F.Fab")
10 | (effects (font (size 0.023368 0.023368) (thickness 0.002032)) (justify left bottom))
11 | (tstamp 4ac60ae9-6f70-4bce-8da5-6eac3cd3a3ad)
12 | )
13 | (pad "TP" smd roundrect (at 0 0) (size 1.27 1.27) (layers "F.Cu" "F.Mask") (roundrect_rratio 0.5)
14 | (solder_mask_margin 0.0635) (tstamp b8f939e4-9cdb-4994-993d-3ae41bb30177))
15 | )
16 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Kicad/OSO-SWAB-B1-00 Sensor Watch Accelerometer/OSO-SWAB-B1-00 Sensor Watch Accelerometer.pretty/_0603MP.kicad_mod:
--------------------------------------------------------------------------------
1 | (footprint "_0603MP" (version 20211014) (generator pcbnew)
2 | (layer "F.Cu")
3 | (tedit 0)
4 | (descr "0603 MicroPitch")
5 | (fp_text reference "REF**" (at -0.9525 -0.635) (layer "F.SilkS")
6 | (effects (font (size 0.666496 0.666496) (thickness 0.146304)) (justify left bottom))
7 | (tstamp 08ea7653-fcf2-4de6-bc2d-71c2559866c5)
8 | )
9 | (fp_text value ">VALUE" (at -0.9525 0.9525) (layer "F.Fab")
10 | (effects (font (size 0.36576 0.36576) (thickness 0.04064)) (justify left bottom))
11 | (tstamp c6f30152-8d59-4f78-bba8-2d4dbdc2be46)
12 | )
13 | (fp_poly (pts
14 | (xy -0.1999 0.25)
15 | (xy 0.1999 0.25)
16 | (xy 0.1999 -0.25)
17 | (xy -0.1999 -0.25)
18 | ) (layer "F.Adhes") (width 0) (fill solid) (tstamp e4d4e5f7-6687-4207-9525-f44fa6947d43))
19 | (fp_line (start 0 -0.254) (end 0 0.254) (layer "F.SilkS") (width 0.2032) (tstamp 8494f3d6-e422-4ed3-afab-572a517aba7f))
20 | (fp_line (start -0.432 0.306) (end 0.432 0.306) (layer "F.Fab") (width 0.1016) (tstamp 3a69b14b-04ad-4165-ab2f-4ad1c270b812))
21 | (fp_line (start 0.432 -0.306) (end -0.432 -0.306) (layer "F.Fab") (width 0.1016) (tstamp 590cef58-c4cf-4e7a-ac89-6a7a7801e6c8))
22 | (fp_poly (pts
23 | (xy 0.4318 0.4)
24 | (xy 0.8 0.4)
25 | (xy 0.8 -0.4)
26 | (xy 0.4318 -0.4)
27 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 2630aa28-dcfc-4f76-bf4f-eac1115a0083))
28 | (fp_poly (pts
29 | (xy -0.8 0.4)
30 | (xy -0.4318 0.4)
31 | (xy -0.4318 -0.4)
32 | (xy -0.8 -0.4)
33 | ) (layer "F.Fab") (width 0) (fill solid) (tstamp 6d4a5dc7-5dd7-4742-b5e4-d512d0913c9b))
34 | (pad "1" smd rect (at -0.762 0) (size 0.8 0.8) (layers "F.Cu" "F.Paste" "F.Mask")
35 | (solder_mask_margin 0.0635) (tstamp 5ce1ec75-6b24-4360-8dcb-9033548b2be2))
36 | (pad "2" smd rect (at 0.762 0) (size 0.8 0.8) (layers "F.Cu" "F.Paste" "F.Mask")
37 | (solder_mask_margin 0.0635) (tstamp 77d09e3e-6f43-44cb-8866-ea235200f8dc))
38 | )
39 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Kicad/OSO-SWAB-B1-00 Sensor Watch Accelerometer/OSO-SWAB-B1-00.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/PCB/Sensor Boards/Kicad/OSO-SWAB-B1-00 Sensor Watch Accelerometer/OSO-SWAB-B1-00.zip
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Kicad/OSO-SWAB-B1-00 Sensor Watch Accelerometer/empty.kicad_wks:
--------------------------------------------------------------------------------
1 | (kicad_wks (version 20210606) (generator pl_editor)
2 | (setup (textsize 1.5 1.5)(linewidth 0.15)(textlinewidth 0.15)
3 | (left_margin 10)(right_margin 10)(top_margin 10)(bottom_margin 10))
4 | (line (name "segm1:Line") (start 0 0) (end 0 0))
5 | )
6 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Kicad/OSO-SWAB-B1-00 Sensor Watch Accelerometer/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (lib (name "OSO-MISC-21-021 Sensor Watch Motion II")(type "KiCad")(uri "$(KIPRJMOD)/OSO-SWAB-B1-00 Sensor Watch Accelerometer.pretty")(options "")(descr ""))
3 | )
4 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Kicad/OSO-SWAB-B1-00 Sensor Watch Accelerometer/sym-lib-table:
--------------------------------------------------------------------------------
1 | (sym_lib_table
2 | (lib (name "OSO-MISC-21-021 Sensor Watch Motion II-eagle-import")(type "KiCad")(uri "${KIPRJMOD}/OSO-MISC-21-021 Sensor Watch Motion II-eagle-import.kicad_sym")(options "")(descr ""))
3 | )
4 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001/.gitignore:
--------------------------------------------------------------------------------
1 | OPT3001DNPT/*
2 |
3 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001.pretty/B1,27.kicad_mod:
--------------------------------------------------------------------------------
1 | (module B1,27 (layer F.Cu) (tedit 0)
2 | (descr "TEST PAD")
3 | (fp_text reference A1 (at 1.524 0 -180) (layer F.SilkS)
4 | (effects (font (size 0.7239 0.7239) (thickness 0.130302)) (justify left bottom))
5 | )
6 | (fp_text value TPB1,27 (at -0.635 0.762 -180) (layer F.Fab)
7 | (effects (font (size 0.77216 0.77216) (thickness 0.138988)) (justify left bottom))
8 | )
9 | (fp_line (start -0.635 0) (end 0.635 0) (layer Dwgs.User) (width 0.0024))
10 | (fp_line (start 0 -0.635) (end 0 0.635) (layer Dwgs.User) (width 0.0024))
11 | (fp_text user >TP_SIGNAL_NAME (at -0.635 1.905) (layer Dwgs.User)
12 | (effects (font (size 0.95 0.95) (thickness 0.08)) (justify left bottom))
13 | )
14 | (pad TP smd roundrect (at 0 0) (size 1.27 1.27) (layers F.Cu F.Mask) (roundrect_rratio 0.5)
15 | (solder_mask_margin 0.0635))
16 | )
17 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001.pretty/FH19C9S05SH10-FFC.kicad_mod:
--------------------------------------------------------------------------------
1 | (module FH19C9S05SH10-FFC (layer F.Cu) (tedit 0)
2 | (descr "FH19C-9S-0.5SH(10)-1
\n")
3 | (fp_text reference U$3 (at 0 0) (layer F.SilkS) hide
4 | (effects (font (size 1.27 1.27) (thickness 0.15)))
5 | )
6 | (fp_text value FH19C-9S-0.5SH_10-FFC (at 0 0) (layer F.SilkS) hide
7 | (effects (font (size 1.27 1.27) (thickness 0.15)))
8 | )
9 | (fp_line (start -2.4892 0) (end -2.4892 3.35) (layer Edge.Cuts) (width 0.05))
10 | (fp_line (start -2.3392 3.5) (end 2.3392 3.5) (layer Edge.Cuts) (width 0.05))
11 | (fp_line (start 2.4892 0) (end 2.4892 3.35) (layer Edge.Cuts) (width 0.05))
12 | (fp_arc (start -2.3392 3.35) (end -2.3392 3.5) (angle 90) (layer Edge.Cuts) (width 0.05))
13 | (fp_arc (start 2.3392 3.35) (end 2.3392 3.5) (angle -90) (layer Edge.Cuts) (width 0.05))
14 | (fp_poly (pts (xy -2.4902 0.9742) (xy 2.4882 0.9742) (xy 2.4892 3.4798) (xy -2.4892 3.4798)) (layer B.Mask) (width 0))
15 | (pad 1 smd rect (at 2 2.25 90) (size 2.5 0.347) (layers B.Cu B.Mask)
16 | (solder_mask_margin 0.0635))
17 | (pad 2 smd rect (at 1.5 2.25 90) (size 2.5 0.347) (layers B.Cu B.Mask)
18 | (solder_mask_margin 0.0635))
19 | (pad 3 smd rect (at 1 2.25 90) (size 2.5 0.347) (layers B.Cu B.Mask)
20 | (solder_mask_margin 0.0635))
21 | (pad 4 smd rect (at 0.5 2.25 90) (size 2.5 0.347) (layers B.Cu B.Mask)
22 | (solder_mask_margin 0.0635))
23 | (pad 5 smd rect (at 0 2.25 90) (size 2.5 0.347) (layers B.Cu B.Mask)
24 | (solder_mask_margin 0.0635))
25 | (pad 6 smd rect (at -0.5 2.25 90) (size 2.5 0.347) (layers B.Cu B.Mask)
26 | (solder_mask_margin 0.0635))
27 | (pad 7 smd rect (at -1 2.25 90) (size 2.5 0.347) (layers B.Cu B.Mask)
28 | (solder_mask_margin 0.0635))
29 | (pad 8 smd rect (at -1.5 2.25 90) (size 2.5 0.347) (layers B.Cu B.Mask)
30 | (solder_mask_margin 0.0635))
31 | (pad 9 smd rect (at -2 2.25 90) (size 2.5 0.347) (layers B.Cu B.Mask)
32 | (solder_mask_margin 0.0635))
33 | )
34 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001.pretty/_0603MP.kicad_mod:
--------------------------------------------------------------------------------
1 | (module _0603MP (layer F.Cu) (tedit 0)
2 | (descr "0603 MicroPitch")
3 | (fp_text reference R1 (at -0.0635 1.7145 -180) (layer F.SilkS)
4 | (effects (font (size 0.77216 0.77216) (thickness 0.138988)) (justify left bottom))
5 | )
6 | (fp_text value "1% 10K" (at -0.9525 0.9525 -180) (layer F.Fab)
7 | (effects (font (size 0.77216 0.77216) (thickness 0.138988)) (justify left bottom))
8 | )
9 | (fp_line (start -0.432 0.306) (end 0.432 0.306) (layer F.Fab) (width 0.1016))
10 | (fp_line (start 0.432 -0.306) (end -0.432 -0.306) (layer F.Fab) (width 0.1016))
11 | (fp_line (start 0 -0.254) (end 0 0.254) (layer F.SilkS) (width 0.2032))
12 | (fp_poly (pts (xy 0.4318 0.4) (xy 0.8 0.4) (xy 0.8 -0.4) (xy 0.4318 -0.4)) (layer F.Fab) (width 0))
13 | (fp_poly (pts (xy -0.8 0.4) (xy -0.4318 0.4) (xy -0.4318 -0.4) (xy -0.8 -0.4)) (layer F.Fab) (width 0))
14 | (fp_poly (pts (xy -0.1999 0.25) (xy 0.1999 0.25) (xy 0.1999 -0.25) (xy -0.1999 -0.25)) (layer F.Adhes) (width 0))
15 | (pad 1 smd rect (at -0.762 0) (size 0.8 0.8) (layers F.Cu F.Paste F.Mask)
16 | (solder_mask_margin 0.0635))
17 | (pad 2 smd rect (at 0.762 0) (size 0.8 0.8) (layers F.Cu F.Paste F.Mask)
18 | (solder_mask_margin 0.0635))
19 | )
20 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001/Q3Q-SWAB-A1-00_Temperature_+_Test_Points_+_OPT3001-eagle-import.dcm:
--------------------------------------------------------------------------------
1 | EESchema-DOCLIB Version 2.0
2 | #
3 | #End Doc Library
4 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001/empty.kicad_wks:
--------------------------------------------------------------------------------
1 | (page_layout
2 | (setup (textsize 1.5 1.5)(linewidth 0.15)(textlinewidth 0.15)
3 | (left_margin 10)(right_margin 10)(top_margin 10)(bottom_margin 10))
4 | (line (name segm1:Line) (start 0 0) (end 0 0))
5 | )
6 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001/fp-info-cache:
--------------------------------------------------------------------------------
1 | 0
2 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001/fp-lib-table:
--------------------------------------------------------------------------------
1 | (fp_lib_table
2 | (lib (name "Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001")(type KiCad)(uri "$(KIPRJMOD)/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001.pretty")(options "")(descr ""))
3 | (lib (name OPT3001DNPT)(type KiCad)(uri ${KIPRJMOD}/OPT3001DNPT)(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/PCB/Sensor Boards/Q3Q-SWAB-A1-00 Temperature + Test Points + OPT3001/sym-lib-table:
--------------------------------------------------------------------------------
1 | (sym_lib_table
2 | (lib (name Q3Q-SWAB-A1-00_Temperature_+_Test_Points_+_OPT3001-eagle-import)(type Legacy)(uri ${KIPRJMOD}/Q3Q-SWAB-A1-00_Temperature_+_Test_Points_+_OPT3001-eagle-import.lib)(options "")(descr ""))
3 | (lib (name OPT3001DNPT)(type Legacy)(uri ${KIPRJMOD}/OPT3001DNPT/OPT3001DNPT.lib)(options "")(descr ""))
4 | )
5 |
--------------------------------------------------------------------------------
/apps/accelerometer-test/Makefile:
--------------------------------------------------------------------------------
1 | TOP = ../..
2 | include $(TOP)/make.mk
3 |
4 | INCLUDES += \
5 | -I./
6 |
7 | SRCS += \
8 | ./app.c
9 |
10 | include $(TOP)/rules.mk
11 |
--------------------------------------------------------------------------------
/apps/accelerometer-test/app.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include "watch.h"
6 | #include "lis2dw.h"
7 |
8 | static void cb_light_pressed(void) {
9 | }
10 |
11 | static void cb_mode_pressed(void) {
12 | }
13 |
14 | static void cb_alarm_pressed(void) {
15 | }
16 |
17 | uint8_t interrupts = 0;
18 | uint8_t last_interrupts = 0;
19 | bool tick = false;
20 | char buf[13] = {0};
21 |
22 | static void cb_tick(void) {
23 | if (!lis2dw_have_new_data()) return;
24 |
25 | tick = true;
26 | }
27 |
28 | void app_init(void) {
29 | watch_enable_display();
30 | watch_display_string("AC Strean", 0);
31 |
32 | watch_enable_external_interrupts();
33 | watch_register_interrupt_callback(BTN_MODE, cb_mode_pressed, INTERRUPT_TRIGGER_RISING);
34 | watch_register_interrupt_callback(BTN_LIGHT, cb_light_pressed, INTERRUPT_TRIGGER_RISING);
35 | watch_register_interrupt_callback(BTN_ALARM, cb_alarm_pressed, INTERRUPT_TRIGGER_RISING);
36 |
37 | watch_enable_i2c();
38 | lis2dw_begin();
39 | lis2dw_set_data_rate(LIS2DW_DATA_RATE_25_HZ);
40 | lis2dw_set_range(LIS2DW_RANGE_4_G);
41 | lis2dw_set_low_noise_mode(true);
42 | lis2dw_enable_fifo();
43 |
44 | lis2dw_enable_fifo();
45 |
46 | watch_rtc_register_periodic_callback(cb_tick, 1);
47 | }
48 |
49 | void app_wake_from_backup(void) {
50 | }
51 |
52 | void app_setup(void) {
53 | }
54 |
55 | void app_prepare_for_standby(void) {
56 | }
57 |
58 | void app_wake_from_standby(void) {
59 | }
60 |
61 | bool app_loop(void) {
62 | if (tick) {
63 | tick = false;
64 | lis2dw_fifo_t fifo;
65 | lis2dw_read_fifo(&fifo);
66 | for(int i = 0; i < fifo.count; i++) {
67 | printf("%d, %d, %d, %d, %d\n", fifo.readings[i].x, fifo.readings[i].y, fifo.readings[i].z, i, fifo.count);
68 | }
69 | }
70 |
71 | return true;
72 | }
73 |
--------------------------------------------------------------------------------
/apps/beats-time/make/Makefile:
--------------------------------------------------------------------------------
1 | # Leave this line at the top of the file; it has all the watch library sources and includes.
2 | TOP = ../../..
3 | include $(TOP)/make.mk
4 |
5 | # If you add any other subdirectories with header files you wish to include, add them after ../
6 | # Note that you will need to add a backslash at the end of any line you wish to continue, i.e.
7 | # INCLUDES += \
8 | # -I../ \
9 | # -I../drivers/ \
10 | # -I../utils/
11 | INCLUDES += \
12 | -I../ \
13 |
14 | # If you add any other source files you wish to compile, add them after ../app.c
15 | # Note that you will need to add a backslash at the end of any line you wish to continue, i.e.
16 | # SRCS += \
17 | # ../app.c \
18 | # ../drivers/bmp280.c \
19 | # ../utils/temperature.c
20 | SRCS += \
21 | ../app.c \
22 |
23 | # Leave this line at the bottom of the file; it has all the targets for making your project.
24 | include $(TOP)/rules.mk
25 |
--------------------------------------------------------------------------------
/apps/buzzer-test/make/Makefile:
--------------------------------------------------------------------------------
1 | TOP = ../../..
2 | include $(TOP)/make.mk
3 |
4 | INCLUDES += \
5 | -I../
6 |
7 | SRCS += \
8 | ../app.c
9 |
10 | include $(TOP)/rules.mk
11 |
--------------------------------------------------------------------------------
/apps/eeprom-emulation-upgrade/Makefile:
--------------------------------------------------------------------------------
1 | TOP = ../..
2 | include $(TOP)/make.mk
3 |
4 | INCLUDES += \
5 | -I./
6 |
7 | SRCS += \
8 | ./app.c
9 |
10 | include $(TOP)/rules.mk
11 |
--------------------------------------------------------------------------------
/apps/flash-test/Makefile:
--------------------------------------------------------------------------------
1 | TOP = ../..
2 | include $(TOP)/make.mk
3 |
4 | INCLUDES += \
5 | -I$(TOP)/littlefs/ \
6 | -I./
7 |
8 | SRCS += \
9 | $(TOP)/littlefs/lfs.c \
10 | $(TOP)/littlefs/lfs_util.c \
11 | ./app.c
12 |
13 | include $(TOP)/rules.mk
14 |
--------------------------------------------------------------------------------
/apps/functional-test/app.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include "watch.h"
4 |
5 | void app_init(void) {
6 | }
7 |
8 | void app_wake_from_backup(void) {
9 | }
10 |
11 | void app_setup(void) {
12 | watch_enable_display();
13 |
14 | watch_enable_buzzer();
15 |
16 | watch_enable_digital_output(RED);
17 | watch_enable_digital_output(GREEN);
18 | watch_enable_digital_input(BTN_ALARM);
19 | watch_enable_digital_input(BTN_LIGHT);
20 | watch_enable_digital_input(BTN_MODE);
21 | watch_enable_pull_down(BTN_ALARM);
22 | watch_enable_pull_down(BTN_LIGHT);
23 | watch_enable_pull_down(BTN_MODE);
24 | }
25 |
26 | void app_prepare_for_standby(void) {
27 | }
28 |
29 | void app_wake_from_standby(void) {
30 | }
31 |
32 | bool app_loop(void) {
33 | static int last_button = 0;
34 | static int button = 0;
35 | static int8_t loop = 0;
36 |
37 | watch_set_pin_level(GREEN, false);
38 | watch_set_pin_level(RED, false);
39 | if (watch_get_pin_level(BTN_ALARM)) {
40 | watch_set_pin_level(GREEN, true);
41 | button = 1;
42 | } else if (watch_get_pin_level(BTN_LIGHT)) {
43 | watch_set_pin_level(RED, true);
44 | button = 2;
45 | } else if (watch_get_pin_level(BTN_MODE)) {
46 | watch_set_pin_level(GREEN, true);
47 | watch_set_pin_level(RED, true);
48 | button = 3;
49 | }
50 |
51 | if (button != last_button) {
52 | last_button = button;
53 | watch_buzzer_play_note(BUZZER_NOTE_C8, 100);
54 | }
55 |
56 | static const bool segmap[3][24] = {
57 | //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
58 | {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0},
59 | {0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1},
60 | {1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1}
61 | };
62 |
63 | for(int com = 0; com < 3; com++) {
64 | for(int seg = 0; seg < 24; seg++) {
65 | if (segmap[com][seg]) (loop >= 0) ? watch_set_pixel(com, seg) : watch_clear_pixel(com, seg);
66 | else (loop < 0) ? watch_set_pixel(com, seg) : watch_clear_pixel(com, seg);
67 | }
68 | }
69 |
70 | loop++;
71 |
72 | return false;
73 | }
74 |
--------------------------------------------------------------------------------
/apps/functional-test/make/Makefile:
--------------------------------------------------------------------------------
1 | TOP = ../../..
2 | include $(TOP)/make.mk
3 |
4 | INCLUDES += \
5 | -I../
6 |
7 | SRCS += \
8 | ../app.c
9 |
10 | include $(TOP)/rules.mk
11 |
--------------------------------------------------------------------------------
/apps/pro-rainbow-test/app.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include "watch.h"
4 |
5 | void app_init(void) {
6 | }
7 |
8 | void app_wake_from_backup(void) {
9 | }
10 |
11 | void app_setup(void) {
12 | watch_enable_leds();
13 | }
14 |
15 | void app_prepare_for_standby(void) {
16 | }
17 |
18 | void app_wake_from_standby(void) {
19 | }
20 |
21 | bool app_loop(void) {
22 | static uint8_t red = 0;
23 | static uint8_t green = 0;
24 | static uint8_t blue = 255;
25 | static uint8_t phase = 0;
26 |
27 | switch (phase) {
28 | case 0:
29 | red++;
30 | if (red == 255) phase = 1;
31 | break;
32 | case 1:
33 | green++;
34 | if (green == 255) phase = 2;
35 | break;
36 | case 2:
37 | red--;
38 | if (red == 0) phase = 3;
39 | break;
40 | case 3:
41 | blue++;
42 | if (blue == 255) phase = 4;
43 | break;
44 | case 4:
45 | green--;
46 | if (green == 0) phase = 5;
47 | break;
48 | case 5:
49 | red++;
50 | if (red == 255) phase = 6;
51 | break;
52 | case 6:
53 | blue--;
54 | if (blue == 0) {
55 | phase = 1;
56 | }
57 | break;
58 | }
59 |
60 | watch_set_led_color_rgb(red, green, blue);
61 | delay_ms(2);
62 |
63 | return false;
64 | }
65 |
--------------------------------------------------------------------------------
/apps/pro-rainbow-test/make/Makefile:
--------------------------------------------------------------------------------
1 | TOP = ../../..
2 | include $(TOP)/make.mk
3 |
4 | INCLUDES += \
5 | -I../
6 |
7 | SRCS += \
8 | ../app.c
9 |
10 | include $(TOP)/rules.mk
11 |
--------------------------------------------------------------------------------
/apps/sensor-board-test/app.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include "watch.h"
4 |
5 | bool even = false;
6 |
7 | static void cb_tick(void) {
8 | even = !even;
9 | }
10 |
11 | void app_init(void) {
12 | }
13 |
14 | void app_wake_from_backup(void) {
15 | }
16 |
17 | void app_setup(void) {
18 | watch_enable_digital_output(RED);
19 | watch_enable_digital_output(GREEN);
20 | watch_enable_digital_output(A0);
21 | watch_enable_digital_output(SCL);
22 | watch_enable_digital_output(SDA);
23 | watch_enable_digital_output(A1);
24 | watch_enable_digital_output(A2);
25 | watch_enable_digital_output(A3);
26 | watch_enable_digital_output(A4);
27 |
28 | watch_set_pin_level(A0, false);
29 | watch_set_pin_level(SCL, false);
30 | watch_set_pin_level(SDA, false);
31 | watch_set_pin_level(A1, false);
32 | watch_set_pin_level(A2, false);
33 | watch_set_pin_level(A3, false);
34 | watch_set_pin_level(A4, false);
35 |
36 | watch_rtc_register_periodic_callback(cb_tick, 2);
37 | }
38 |
39 | void app_prepare_for_standby(void) {
40 | }
41 |
42 | void app_wake_from_standby(void) {
43 | }
44 |
45 | bool app_loop(void) {
46 | watch_date_time date_time = watch_rtc_get_date_time();
47 | char buf[16];
48 | sprintf(buf, "%2d:%02d:%02d: ", date_time.unit.hour, date_time.unit.minute, date_time.unit.second);
49 | printf(buf);
50 | if (even) {
51 | printf("Even\n");
52 | watch_set_pin_level(RED, false);
53 | watch_set_pin_level(GREEN, true);
54 | watch_set_pin_level(A0, true);
55 | watch_set_pin_level(SCL, false);
56 | watch_set_pin_level(SDA, true);
57 | watch_set_pin_level(A1, false);
58 | watch_set_pin_level(A2, true);
59 | watch_set_pin_level(A3, false);
60 | watch_set_pin_level(A4, true);
61 | } else {
62 | printf("Odd\n");
63 | watch_set_pin_level(RED, true);
64 | watch_set_pin_level(GREEN, false);
65 | watch_set_pin_level(A0, false);
66 | watch_set_pin_level(SCL, true);
67 | watch_set_pin_level(SDA, false);
68 | watch_set_pin_level(A1, true);
69 | watch_set_pin_level(A2, false);
70 | watch_set_pin_level(A3, true);
71 | watch_set_pin_level(A4, false);
72 | }
73 |
74 | return true;
75 | }
76 |
--------------------------------------------------------------------------------
/apps/sensor-board-test/make/Makefile:
--------------------------------------------------------------------------------
1 | TOP = ../../..
2 | include $(TOP)/make.mk
3 |
4 | INCLUDES += \
5 | -I../
6 |
7 | SRCS += \
8 | ../app.c
9 |
10 | include $(TOP)/rules.mk
11 |
--------------------------------------------------------------------------------
/apps/sensor-watch-lite-test/make/Makefile:
--------------------------------------------------------------------------------
1 | TOP = ../../..
2 | include $(TOP)/make.mk
3 |
4 | INCLUDES += \
5 | -I../
6 |
7 | SRCS += \
8 | ../app.c
9 |
10 | include $(TOP)/rules.mk
11 |
--------------------------------------------------------------------------------
/apps/sensor-watch-pro-test/make/Makefile:
--------------------------------------------------------------------------------
1 | TOP = ../../..
2 | include $(TOP)/make.mk
3 |
4 | INCLUDES += \
5 | -I../
6 |
7 | SRCS += \
8 | ../app.c
9 |
10 | include $(TOP)/rules.mk
11 |
--------------------------------------------------------------------------------
/apps/spi-test/Makefile:
--------------------------------------------------------------------------------
1 | TOP = ../..
2 | include $(TOP)/make.mk
3 |
4 | INCLUDES += \
5 | -I./
6 |
7 | SRCS += \
8 | ./app.c
9 |
10 | include $(TOP)/rules.mk
11 |
--------------------------------------------------------------------------------
/apps/starter-project/Makefile:
--------------------------------------------------------------------------------
1 | # Leave these lines at the top of the file.
2 | # TOP should get us to the root of the project...
3 | TOP = ../..
4 | # ...and make.mk has all the watch library sources and includes.
5 | include $(TOP)/make.mk
6 |
7 | # If you add any other subdirectories with header files you wish to include, add them after ./
8 | # Note that you will need to add a backslash at the end of any line you wish to continue, i.e.
9 | # INCLUDES += \
10 | # -I./ \
11 | # -I drivers/ \
12 | # -I utils/
13 | INCLUDES += \
14 | -I./ \
15 |
16 | # If you add any other source files you wish to compile, add them after app.c
17 | # Note that you will need to add a backslash at the end of any line you wish to continue, i.e.
18 | # SRCS += \
19 | # ./app.c \
20 | # ./drivers/bmp280.c \
21 | # ./utils/temperature.c
22 | SRCS += \
23 | ./app.c \
24 |
25 | # Leave this line at the bottom of the file; rules.mk has all the targets for making your project.
26 | include $(TOP)/rules.mk
27 |
--------------------------------------------------------------------------------
/apps/uart-display/Makefile:
--------------------------------------------------------------------------------
1 | TOP = ../..
2 | include $(TOP)/make.mk
3 |
4 | INCLUDES += \
5 | -I./
6 |
7 | SRCS += \
8 | ./app.c
9 |
10 | include $(TOP)/rules.mk
11 |
--------------------------------------------------------------------------------
/images/sensor-board-pinout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/images/sensor-board-pinout.png
--------------------------------------------------------------------------------
/images/sensor-board.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/images/sensor-board.png
--------------------------------------------------------------------------------
/images/sensor-watch.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/images/sensor-watch.jpg
--------------------------------------------------------------------------------
/movement/alt_fw/alt_time.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef MOVEMENT_CONFIG_H_
26 | #define MOVEMENT_CONFIG_H_
27 |
28 | #include "movement_faces.h"
29 |
30 | const watch_face_t watch_faces[] = {
31 | simple_clock_face,
32 | beats_face,
33 | day_one_face,
34 |
35 | preferences_face,
36 | set_time_face,
37 | };
38 |
39 | #define MOVEMENT_NUM_FACES (sizeof(watch_faces) / sizeof(watch_face_t))
40 |
41 | #define SIGNAL_TUNE_DEFAULT
42 |
43 | #endif // MOVEMENT_CONFIG_H_
44 |
--------------------------------------------------------------------------------
/movement/alt_fw/backer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef MOVEMENT_CONFIG_H_
26 | #define MOVEMENT_CONFIG_H_
27 |
28 | #include "movement_faces.h"
29 |
30 | const watch_face_t watch_faces[] = {
31 | simple_clock_face,
32 | world_clock_face,
33 | sunrise_sunset_face,
34 | moon_phase_face,
35 | thermistor_readout_face,
36 |
37 | preferences_face,
38 | set_time_face,
39 | };
40 |
41 | #define MOVEMENT_NUM_FACES (sizeof(watch_faces) / sizeof(watch_face_t))
42 |
43 | #define SIGNAL_TUNE_DEFAULT
44 |
45 | #endif // MOVEMENT_CONFIG_H_
46 |
--------------------------------------------------------------------------------
/movement/alt_fw/deep_space_now.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef MOVEMENT_CONFIG_H_
26 | #define MOVEMENT_CONFIG_H_
27 |
28 | #include "movement_faces.h"
29 |
30 | // Preset Goldstone (GO), Madrid (MA), and Canberra (CA) time zones.
31 | // Also prepopulate the Day One register with Voyager 1's launch (September 5, 1977)
32 |
33 | #define MOVEMENT_CUSTOM_BOOT_COMMANDS() { \
34 | /* Standard Time */\
35 | watch_store_backup_data(0x1e0c0c, 4);\
36 | watch_store_backup_data(0x010115, 5);\
37 | watch_store_backup_data(0x130105, 6);\
38 | /* Daylight Saving Time */\
39 | /*\
40 | watch_store_backup_data(0x1f0c0c, 4);\
41 | watch_store_backup_data(0x020115, 5);\
42 | watch_store_backup_data(0x110105, 6);\
43 | */\
44 | watch_store_backup_data(0x0597b9, 2);\
45 | }
46 |
47 | const watch_face_t watch_faces[] = {
48 | simple_clock_face,
49 | mars_time_face,
50 | world_clock_face,
51 | world_clock_face,
52 | world_clock_face,
53 | day_one_face,
54 |
55 | preferences_face,
56 | set_time_face,
57 | };
58 |
59 | #define MOVEMENT_NUM_FACES (sizeof(watch_faces) / sizeof(watch_face_t))
60 |
61 | #define SIGNAL_TUNE_DEFAULT
62 |
63 | #endif // MOVEMENT_CONFIG_H_
64 |
--------------------------------------------------------------------------------
/movement/alt_fw/focus.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef MOVEMENT_CONFIG_H_
26 | #define MOVEMENT_CONFIG_H_
27 |
28 | #include "movement_faces.h"
29 |
30 | const watch_face_t watch_faces[] = {
31 | simple_clock_face,
32 | tomato_face,
33 | stopwatch_face,
34 | countdown_face,
35 | wake_face, // added by @joshber 2022-07-23, per @joeycastillo
36 |
37 | preferences_face,
38 | set_time_face,
39 | };
40 |
41 | #define MOVEMENT_NUM_FACES (sizeof(watch_faces) / sizeof(watch_face_t))
42 |
43 | #define SIGNAL_TUNE_DEFAULT
44 |
45 | #endif // MOVEMENT_CONFIG_H_
46 |
--------------------------------------------------------------------------------
/movement/alt_fw/the_athlete.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef MOVEMENT_CONFIG_H_
26 | #define MOVEMENT_CONFIG_H_
27 |
28 | #include "movement_faces.h"
29 |
30 | const watch_face_t watch_faces[] = {
31 | simple_clock_face,
32 | stopwatch_face,
33 | countdown_face,
34 | counter_face,
35 | pulsometer_face,
36 |
37 | preferences_face,
38 | set_time_face,
39 | };
40 |
41 | #define MOVEMENT_NUM_FACES (sizeof(watch_faces) / sizeof(watch_face_t))
42 |
43 | #define SIGNAL_TUNE_DEFAULT
44 |
45 | #endif // MOVEMENT_CONFIG_H_
46 |
--------------------------------------------------------------------------------
/movement/alt_fw/the_backpacker.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef MOVEMENT_CONFIG_H_
26 | #define MOVEMENT_CONFIG_H_
27 |
28 | #include "movement_faces.h"
29 |
30 | const watch_face_t watch_faces[] = {
31 | simple_clock_face,
32 | sunrise_sunset_face,
33 | moon_phase_face,
34 | thermistor_readout_face,
35 | thermistor_logging_face,
36 | blinky_face,
37 |
38 | preferences_face,
39 | set_time_face,
40 | };
41 |
42 | #define MOVEMENT_NUM_FACES (sizeof(watch_faces) / sizeof(watch_face_t))
43 |
44 | #define SIGNAL_TUNE_DEFAULT
45 |
46 | #endif // MOVEMENT_CONFIG_H_
47 |
--------------------------------------------------------------------------------
/movement/alt_fw/the_stargazer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef MOVEMENT_CONFIG_H_
26 | #define MOVEMENT_CONFIG_H_
27 |
28 | #include "movement_faces.h"
29 |
30 | #define MOVEMENT_DEFAULT_RED_COLOR 0xF
31 | #define MOVEMENT_DEFAULT_GREEN_COLOR 0x0
32 |
33 | const watch_face_t watch_faces[] = {
34 | simple_clock_face,
35 | astronomy_face,
36 | sunrise_sunset_face,
37 | moon_phase_face,
38 |
39 | preferences_face,
40 | set_time_face,
41 | };
42 |
43 | #define MOVEMENT_NUM_FACES (sizeof(watch_faces) / sizeof(watch_face_t))
44 |
45 | #define SIGNAL_TUNE_DEFAULT
46 |
47 | #endif // MOVEMENT_CONFIG_H_
48 |
--------------------------------------------------------------------------------
/movement/alt_fw/timers.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef MOVEMENT_CONFIG_H_
26 | #define MOVEMENT_CONFIG_H_
27 |
28 | #include "movement_faces.h"
29 |
30 | const watch_face_t watch_faces[] = {
31 | simple_clock_face,
32 | wake_face,
33 | interval_face,
34 | stopwatch_face,
35 | sunrise_sunset_face,
36 |
37 | preferences_face,
38 | set_time_face,
39 | };
40 |
41 | #define MOVEMENT_NUM_FACES (sizeof(watch_faces) / sizeof(watch_face_t))
42 |
43 | #define SIGNAL_TUNE_DEFAULT
44 |
45 | #endif // MOVEMENT_CONFIG_H_
46 |
--------------------------------------------------------------------------------
/movement/lib/TOTP/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Weravech
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/movement/lib/TOTP/TOTP.h:
--------------------------------------------------------------------------------
1 | #ifndef TOTP_H_
2 | #define TOTP_H_
3 |
4 | #include
5 | #include "time.h"
6 |
7 | typedef enum __attribute__ ((__packed__)) {
8 | SHA1,
9 | SHA224,
10 | SHA256,
11 | SHA384,
12 | SHA512
13 | } hmac_alg;
14 |
15 | void TOTP(uint8_t* hmacKey, uint8_t keyLength, uint32_t timeStep, hmac_alg algorithm);
16 | void setTimezone(uint8_t timezone);
17 | uint32_t getCodeFromTimestamp(uint32_t timeStamp);
18 | uint32_t getCodeFromTimeStruct(struct tm time);
19 | uint32_t getCodeFromSteps(uint32_t steps);
20 |
21 | #endif // TOTP_H_
22 |
--------------------------------------------------------------------------------
/movement/lib/TOTP/example.c:
--------------------------------------------------------------------------------
1 | #include "TOTP.h"
2 | #include
3 |
4 | /**
5 | * example.c
6 | */
7 | void main(void)
8 | {
9 | uint8_t hmacKey[] = {0x4d, 0x79, 0x4c, 0x65, 0x67, 0x6f, 0x44, 0x6f, 0x6f, 0x72}; // Secret key
10 | TOTP(hmacKey, 10, 7200, SHA1); // Secret key, Key length, Timestep (7200s - 2hours)
11 |
12 | setTimezone(9); // Set timezone
13 | uint32_t newCode = getCodeFromTimestamp(1557414000); // Timestamp Now
14 |
15 | ///////////////// For struct tm //////////////////
16 | // struct tm datetime;
17 | // datetime.tm_hour = 9;
18 | // datetime.tm_min = 0;
19 | // datetime.tm_sec = 0;
20 | // datetime.tm_mday = 13;
21 | // datetime.tm_mon = 5;
22 | // datetime.tm_year = 2019;
23 | // uint32_t newCode = getCodeFromTimeStruct(datetime);
24 | ///////////////////////////////////////////////////
25 |
26 | printf("Code : %06u\n",newCode);
27 | }
28 |
--------------------------------------------------------------------------------
/movement/lib/astrolib/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Public domain
2 |
3 | THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
5 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
6 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
8 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
9 | SOFTWARE.
10 |
--------------------------------------------------------------------------------
/movement/lib/astrolib/README.md:
--------------------------------------------------------------------------------
1 | # Astrolib
2 |
3 | This is a relatively straightforward C port of Greg Miller's [JavaScript astro library](https://github.com/gmiller123456/astrogreg), done by Joey Castillo, for the Sensor Watch Astronomy watch face.
4 |
5 | He released his work into the public domain and so I release this into the public domain as well.
6 |
7 | I have tested the output of this library against [NASA's Horizons system](https://ssd.jpl.nasa.gov/horizons/app.html#/) and found the results to match (within reason, as we're using a truncated version of VSOP87). Moon calculations still seem a bit iffy, but it doesn't surprise me seeing as there are three calculations involved and the error could stack up.
8 |
9 | THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/movement/lib/morsecalc/calc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2023 Christian Chapman
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef CALC_H_INCLUDED
26 | #define CALC_H_INCLUDED
27 |
28 | #include
29 |
30 | #define N_STACK 10
31 |
32 | typedef struct {
33 | double stack[N_STACK];
34 | double mem;
35 | uint8_t s; // # of items in stack
36 | } calc_state_t;
37 |
38 | int calc_init(calc_state_t *cs);
39 | int calc_input(calc_state_t *cs, char *token);
40 | int calc_input_function(calc_state_t *cs, char *token);
41 | int calc_input_float(calc_state_t *cs, char *token);
42 | double calc_strtof(const char *str, char **endptr);
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/movement/lib/morsecalc/morsecalc_display.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2023 Christian Chapman
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #include "morsecalc_face.h"
26 |
27 | // Display float on screen
28 | void morsecalc_display_float(double d);
29 |
30 | // Print current input token
31 | void morsecalc_display_token(morsecalc_state_t *mcs);
32 |
33 | // Print stack or memory register contents.
34 | void morsecalc_display_stack(morsecalc_state_t *mcs);
35 |
36 |
--------------------------------------------------------------------------------
/movement/lib/vsop87/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Author: Greg A Miller (gmiller@gregmiller.net)
2 | I release all of my work in this project to the public domain.
3 |
4 | Note, though, not everything here can be considered my work. The VSOP87 theory is the work of
5 | Bureau des Longitudes.
--------------------------------------------------------------------------------
/movement/lib/vsop87/vsop87a_micro.h:
--------------------------------------------------------------------------------
1 | //VSOP87-Multilang http://www.astrogreg.com/vsop87-multilang/index.html
2 | //Greg Miller (gmiller@gregmiller.net) 2019. Released as Public Domain
3 |
4 | #ifndef VSOP87A_MICRO
5 | #define VSOP87A_MICRO
6 |
7 | void vsop87a_micro_getEarth(double t,double temp[]);
8 | void vsop87a_micro_getEmb(double t,double temp[]);
9 | void vsop87a_micro_getJupiter(double t,double temp[]);
10 | void vsop87a_micro_getMars(double t,double temp[]);
11 | void vsop87a_micro_getMercury(double t,double temp[]);
12 | void vsop87a_micro_getNeptune(double t,double temp[]);
13 | void vsop87a_micro_getSaturn(double t,double temp[]);
14 | void vsop87a_micro_getUranus(double t,double temp[]);
15 | void vsop87a_micro_getVenus(double t,double temp[]);
16 | void vsop87a_micro_getMoon(double earth[], double emb[],double temp[]);
17 | #endif
18 |
--------------------------------------------------------------------------------
/movement/lib/vsop87/vsop87a_milli.h:
--------------------------------------------------------------------------------
1 | //VSOP87-Multilang http://www.astrogreg.com/vsop87-multilang/index.html
2 | //Greg Miller (gmiller@gregmiller.net) 2019. Released as Public Domain
3 |
4 | #ifndef VSOP87A_MILLI
5 | #define VSOP87A_MILLI
6 |
7 | void vsop87a_milli_getEarth(double t,double temp[]);
8 | void vsop87a_milli_getEmb(double t,double temp[]);
9 | void vsop87a_milli_getJupiter(double t,double temp[]);
10 | void vsop87a_milli_getMars(double t,double temp[]);
11 | void vsop87a_milli_getMercury(double t,double temp[]);
12 | void vsop87a_milli_getNeptune(double t,double temp[]);
13 | void vsop87a_milli_getSaturn(double t,double temp[]);
14 | void vsop87a_milli_getUranus(double t,double temp[]);
15 | void vsop87a_milli_getVenus(double t,double temp[]);
16 | void vsop87a_milli_getMoon(double earth[], double emb[],double temp[]);
17 | #endif
18 |
--------------------------------------------------------------------------------
/movement/make/.gitignore:
--------------------------------------------------------------------------------
1 | build/
2 | firmware/
3 |
--------------------------------------------------------------------------------
/movement/make/make_alternate_fw.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | fw_dir="firmware/download"
4 | sim_dir="firmware/simulate"
5 | colors=("green" "blue" "red")
6 | variants=("standard" "backer" "alt_time" "deep_space_now" "focus" "the_athlete" "the_backpacker" "the_stargazer")
7 |
8 | if [ -d "$fw_dir" ] ; then
9 | rm -r "$fw_dir"
10 | fi
11 | if [ -d "$sim_dir" ] ; then
12 | rm -r "$sim_dir"
13 | fi
14 |
15 | mkdir -p "$fw_dir"
16 | mkdir -p "$sim_dir"
17 |
18 | for variant in "${variants[@]}"
19 | do
20 | VARIANT=$(echo "$variant" | tr '[:lower:]' '[:upper:]')
21 | for color in "${colors[@]}"
22 | do
23 | COLOR=$(echo "$color" | tr '[:lower:]' '[:upper:]')
24 | make COLOR=$COLOR clean
25 | make COLOR=$COLOR FIRMWARE=$VARIANT
26 | mv "build/watch.uf2" "$fw_dir/$variant-$color.uf2"
27 | done
28 | rm -rf ./build-sim
29 | emmake make COLOR=GREEN FIRMWARE=$VARIANT
30 | mkdir "$sim_dir/$variant/"
31 | mv "build-sim/watch.wasm" "$sim_dir/$variant/"
32 | mv "build-sim/watch.js" "$sim_dir/$variant/"
33 | mv "build-sim/watch.html" "$sim_dir/$variant/index.html"
34 | done
35 |
36 | echo "Done."
37 |
--------------------------------------------------------------------------------
/movement/shell.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2023 Edward Shin
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef SHELL_H_
26 | #define SHELL_H_
27 |
28 | /** @brief Called periodically from the app loop to handle shell commands.
29 | * When a full command is complete, parses and executes its matching
30 | * callback.
31 | */
32 | void shell_task(void);
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/movement/shell_cmd_list.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2023 Edward Shin
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef SHELL_CMD_LIST_H_
26 | #define SHELL_CMD_LIST_H_
27 |
28 | #include
29 |
30 | typedef struct {
31 | const char *name; // Name used to invoke the command
32 | const char *help; // Help string
33 | int8_t min_args; // Minimum number of arguments (_excluding_ the command name)
34 | int8_t max_args; // Maximum number of arguments (_excluding_ the command name)
35 | int (*cb)(int argc, char *argv[]); // Callback for the command
36 | } shell_command_t;
37 |
38 | #endif
39 |
--------------------------------------------------------------------------------
/movement/template/template.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) <#year#> <#author_name#>
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef <#WATCH_FACE_NAME#>_FACE_H_
26 | #define <#WATCH_FACE_NAME#>_FACE_H_
27 |
28 | #include "movement.h"
29 |
30 | /*
31 | * A DESCRIPTION OF YOUR WATCH FACE
32 | *
33 | * and a description of how use it
34 | *
35 | */
36 |
37 | typedef struct {
38 | // Anything you need to keep track of, put it here!
39 | uint8_t unused;
40 | } <#watch_face_name#>_state_t;
41 |
42 | void <#watch_face_name#>_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
43 | void <#watch_face_name#>_face_activate(movement_settings_t *settings, void *context);
44 | bool <#watch_face_name#>_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
45 | void <#watch_face_name#>_face_resign(movement_settings_t *settings, void *context);
46 |
47 | #define <#watch_face_name#>_face ((const watch_face_t){ \
48 | <#watch_face_name#>_face_setup, \
49 | <#watch_face_name#>_face_activate, \
50 | <#watch_face_name#>_face_loop, \
51 | <#watch_face_name#>_face_resign, \
52 | NULL, \
53 | })
54 |
55 | #endif // <#WATCH_FACE_NAME#>_FACE_H_
56 |
57 |
--------------------------------------------------------------------------------
/movement/watch_faces/clock/minimal_clock_face.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2023 Dennisman219
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef MINIMAL_CLOCK_FACE_H_
26 | #define MINIMAL_CLOCK_FACE_H_
27 |
28 | #include "movement.h"
29 |
30 | /*
31 | * MINIMAL CLOCK FACE
32 | *
33 | * A minimal clock face that just shows hours and minutes.
34 | * There is nothing to configure. The face follows the 12h/24h setting
35 | *
36 | */
37 |
38 | typedef struct {
39 | // Anything you need to keep track of, put it here!
40 | uint8_t unused;
41 | } minimal_clock_state_t;
42 |
43 | void minimal_clock_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
44 | void minimal_clock_face_activate(movement_settings_t *settings, void *context);
45 | bool minimal_clock_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
46 | void minimal_clock_face_resign(movement_settings_t *settings, void *context);
47 |
48 | #define minimal_clock_face ((const watch_face_t){ \
49 | minimal_clock_face_setup, \
50 | minimal_clock_face_activate, \
51 | minimal_clock_face_loop, \
52 | minimal_clock_face_resign, \
53 | NULL, \
54 | })
55 |
56 | #endif // MINIMAL_CLOCK_FACE_H_
57 |
58 |
--------------------------------------------------------------------------------
/movement/watch_faces/complication/breathing_face.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2023 Bernd Plontsch
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef BREATHING_FACE_H_
26 | #define BREATHING_FACE_H_
27 |
28 | /*
29 | * BOXED BREATHING face
30 | *
31 | * Breathing is a complication for guiding boxed breathing sessions.
32 | * Boxed breathing is a technique to help you stay calm and improve
33 | * concentration in stressful situations.
34 | *
35 | * Usage: Timed messages will cycle as long as this face is active.
36 | * Press ALARM to toggle sound.
37 | */
38 |
39 | #include "movement.h"
40 |
41 | void breathing_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
42 | void breathing_face_activate(movement_settings_t *settings, void *context);
43 | bool breathing_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
44 | void breathing_face_resign(movement_settings_t *settings, void *context);
45 |
46 | #define breathing_face ((const watch_face_t){ \
47 | breathing_face_setup, \
48 | breathing_face_activate, \
49 | breathing_face_loop, \
50 | breathing_face_resign, \
51 | NULL, \
52 | })
53 |
54 | #endif // BREATHING_FACE_H_
55 |
--------------------------------------------------------------------------------
/movement/watch_faces/complication/flashlight_face.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2023 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef FLASHLIGHT_FACE_H_
26 | #define FLASHLIGHT_FACE_H_
27 |
28 | /*
29 | * FLASHLIGHT face
30 | *
31 | * A flashlight for use with the Flashlight sensor board.
32 | *
33 | * When the watch face appears, the display will show "FL" in the top two positions.
34 | * Pressing the Light button will toggle the flashlight on and off.
35 | *
36 | */
37 |
38 | #include "movement.h"
39 |
40 | typedef struct {
41 | // Anything you need to keep track of, put it here!
42 | uint8_t unused;
43 | } flashlight_state_t;
44 |
45 | void flashlight_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
46 | void flashlight_face_activate(movement_settings_t *settings, void *context);
47 | bool flashlight_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
48 | void flashlight_face_resign(movement_settings_t *settings, void *context);
49 |
50 | #define flashlight_face ((const watch_face_t){ \
51 | flashlight_face_setup, \
52 | flashlight_face_activate, \
53 | flashlight_face_loop, \
54 | flashlight_face_resign, \
55 | NULL, \
56 | })
57 |
58 | #endif // FLASHLIGHT_FACE_H_
59 |
60 |
--------------------------------------------------------------------------------
/movement/watch_faces/complication/habit_face.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2023 tslil clingman
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef HABIT_FACE_H_
26 | #define HABIT_FACE_H_
27 |
28 | /*
29 | * Habit tracking face
30 | *
31 | * Allows the user to record a single succesful instance of a particular habit
32 | * occuring per day, and displays history for eight days prior as well as a
33 | * total counter.
34 | *
35 | */
36 |
37 | #include "movement.h"
38 |
39 | void habit_face_setup(movement_settings_t *settings, uint8_t watch_face_index,
40 | void **context_ptr);
41 | void habit_face_activate(movement_settings_t *settings, void *context);
42 | bool habit_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
43 | void habit_face_resign(movement_settings_t *settings, void *context);
44 |
45 | #define habit_face ((const watch_face_t){ \
46 | habit_face_setup, \
47 | habit_face_activate, \
48 | habit_face_loop, \
49 | habit_face_resign, \
50 | NULL, \
51 | })
52 |
53 | #endif // HABIT_FACE_H_
54 |
--------------------------------------------------------------------------------
/movement/watch_faces/complication/tuning_tones_face.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2023 Per Waagø
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef TUNING_TONES_FACE_H_
26 | #define TUNING_TONES_FACE_H_
27 |
28 | #include "movement.h"
29 |
30 | /*
31 | * A DESCRIPTION OF YOUR WATCH FACE
32 | *
33 | * and a description of how use it
34 | *
35 | */
36 |
37 | typedef struct {
38 | // Anything you need to keep track of, put it here!
39 | bool playing;
40 | size_t note_ind;
41 | } tuning_tones_state_t;
42 |
43 | void tuning_tones_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
44 | void tuning_tones_face_activate(movement_settings_t *settings, void *context);
45 | bool tuning_tones_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
46 | void tuning_tones_face_resign(movement_settings_t *settings, void *context);
47 |
48 | #define tuning_tones_face ((const watch_face_t){ \
49 | tuning_tones_face_setup, \
50 | tuning_tones_face_activate, \
51 | tuning_tones_face_loop, \
52 | tuning_tones_face_resign, \
53 | NULL, \
54 | })
55 |
56 | #endif // TUNING_TONES_FACE_H_
57 |
58 |
--------------------------------------------------------------------------------
/movement/watch_faces/complication/wareki_face.h:
--------------------------------------------------------------------------------
1 | #ifndef WAREKI_FACE_H_
2 | #define WAREKI_FACE_H_
3 |
4 | #include "movement.h"
5 |
6 | #define REIWA_LIMIT 2018 + 31
7 | #define REIWA_GANNEN 2019
8 | #define HEISEI_GANNEN 1989
9 |
10 | typedef struct {
11 | bool active;
12 | uint32_t disp_year; //Current displayed year
13 | uint32_t start_year; //Year when this screen was launched
14 | uint32_t real_year; //The actual current year
15 | } wareki_state_t;
16 |
17 |
18 | void wareki_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
19 | void wareki_activate(movement_settings_t *settings, void *context);
20 | bool wareki_loop(movement_event_t event, movement_settings_t *settings, void *context);
21 | void wareki_resign(movement_settings_t *settings, void *context);
22 | void addYear(wareki_state_t* state,int count);
23 | void subYear(wareki_state_t* state,int count);
24 |
25 | #define wareki_face ((const watch_face_t){ \
26 | wareki_setup, \
27 | wareki_activate, \
28 | wareki_loop, \
29 | wareki_resign, \
30 | NULL, \
31 | })
32 |
33 | #endif // WAREKI_FACE_H_
34 |
35 |
--------------------------------------------------------------------------------
/movement/watch_faces/demo/character_set_face.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef CHARACTER_SET_FACE_H_
26 | #define CHARACTER_SET_FACE_H_
27 |
28 | /*
29 | * CHARACTER SET FACE
30 | *
31 | * This watch face displays all of the characters in the Sensor Watch character
32 | * set. You can advance from one character to the next with a short press of the
33 | * ALARM button.
34 | *
35 | * This watch face may be useful to watch face developers, in that it can help
36 | * them to understand which characters will work in different positions.
37 | */
38 |
39 | #include "movement.h"
40 |
41 | void character_set_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
42 | void character_set_face_activate(movement_settings_t *settings, void *context);
43 | bool character_set_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
44 | void character_set_face_resign(movement_settings_t *settings, void *context);
45 |
46 | #define character_set_face ((const watch_face_t){ \
47 | character_set_face_setup, \
48 | character_set_face_activate, \
49 | character_set_face_loop, \
50 | character_set_face_resign, \
51 | NULL, \
52 | })
53 |
54 | #endif // CHARACTER_SET_FACE_H_
55 |
--------------------------------------------------------------------------------
/movement/watch_faces/demo/demo_face.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef DEMO_FACE_H_
26 | #define DEMO_FACE_H_
27 |
28 | /*
29 | * DEMO FACE
30 | *
31 | * This watch was designed for the Crowd Supply marketing team, so they could
32 | * photograph the various functions of Sensor Watch. The Alarm button advances
33 | * through static screens that simulate different watch faces.
34 | *
35 | * This watch face may only be useful to you if you need to photograph Sensor
36 | * Watch, i.e. for a blog post.
37 | */
38 |
39 | #include "movement.h"
40 |
41 | void demo_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
42 | void demo_face_activate(movement_settings_t *settings, void *context);
43 | bool demo_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
44 | void demo_face_resign(movement_settings_t *settings, void *context);
45 |
46 | #define demo_face ((const watch_face_t){ \
47 | demo_face_setup, \
48 | demo_face_activate, \
49 | demo_face_loop, \
50 | demo_face_resign, \
51 | NULL, \
52 | })
53 |
54 | #endif // DEMO_FACE_H_
55 |
--------------------------------------------------------------------------------
/movement/watch_faces/demo/hello_there_face.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef HELLO_THERE_FACE_H_
26 | #define HELLO_THERE_FACE_H_
27 |
28 | /*
29 | * HELLO THERE FACE
30 | *
31 | * A simple demo that displays the word "Hello" and then the word "there",
32 | * on an endless loop. Press ALARM to pause or resume the animation.
33 | */
34 |
35 | #include "movement.h"
36 |
37 | typedef struct {
38 | uint8_t current_word;
39 | bool animating;
40 | } hello_there_state_t;
41 |
42 | void hello_there_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
43 | void hello_there_face_activate(movement_settings_t *settings, void *context);
44 | bool hello_there_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
45 | void hello_there_face_resign(movement_settings_t *settings, void *context);
46 |
47 | #define hello_there_face ((const watch_face_t){ \
48 | hello_there_face_setup, \
49 | hello_there_face_activate, \
50 | hello_there_face_loop, \
51 | hello_there_face_resign, \
52 | NULL, \
53 | })
54 |
55 | #endif // HELLO_THERE_FACE_H_
56 |
--------------------------------------------------------------------------------
/movement/watch_faces/demo/voltage_face.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef VOLTAGE_FACE_H_
26 | #define VOLTAGE_FACE_H_
27 |
28 | /*
29 | * VOLTAGE face
30 | *
31 | * This watch face is very simple and has no controls to speak of. It displays
32 | * the battery voltage as measured by the SAM L22’s ADC.
33 | *
34 | * Note that the Simple Clock watch face includes a low battery warning, so you
35 | * don’t technically need to this watch face unless you want to track the
36 | * battery level.
37 | */
38 |
39 | #include "movement.h"
40 |
41 | void voltage_face_setup(movement_settings_t *settings, uint8_t watch_face_index, void ** context_ptr);
42 | void voltage_face_activate(movement_settings_t *settings, void *context);
43 | bool voltage_face_loop(movement_event_t event, movement_settings_t *settings, void *context);
44 | void voltage_face_resign(movement_settings_t *settings, void *context);
45 |
46 | #define voltage_face ((const watch_face_t){ \
47 | voltage_face_setup, \
48 | voltage_face_activate, \
49 | voltage_face_loop, \
50 | voltage_face_resign, \
51 | NULL, \
52 | })
53 |
54 | #endif // VOLTAGE_FACE_H_
55 |
--------------------------------------------------------------------------------
/openocd.cfg:
--------------------------------------------------------------------------------
1 | adapter driver cmsis-dap
2 | adapter speed 5000
3 | transport select swd
4 |
5 | swd newdap SAML22 cpu -irlen 4
6 | dap create SAML22.dap -chain-position SAML22.cpu
7 |
8 | set _TARGETNAME SAML22.cpu
9 | target create $_TARGETNAME cortex_m -dap SAML22.dap
10 | cortex_m reset_config sysresetreq
11 |
--------------------------------------------------------------------------------
/rules.mk:
--------------------------------------------------------------------------------
1 | .SUFFIXES:
2 |
3 | CFLAGS += $(INCLUDES) $(DEFINES)
4 |
5 | OBJS = $(addprefix $(BUILD)/, $(notdir %/$(subst .c,.o, $(SRCS))))
6 |
7 | SUBMODULES = tinyusb
8 |
9 | COBRA = cobra -f
10 |
11 | ifndef EMSCRIPTEN
12 | all: $(BUILD)/$(BIN).elf $(BUILD)/$(BIN).hex $(BUILD)/$(BIN).bin $(BUILD)/$(BIN).uf2 size
13 | else
14 | all: $(BUILD)/$(BIN).html
15 | endif
16 |
17 | $(BUILD)/$(BIN).html: $(OBJS)
18 | @echo HTML $@
19 | @$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ \
20 | -s ASYNCIFY=1 \
21 | -s EXPORTED_RUNTIME_METHODS=lengthBytesUTF8,printErr \
22 | -s EXPORTED_FUNCTIONS=_main \
23 | --shell-file=$(TOP)/watch-library/simulator/shell.html
24 |
25 | $(BUILD)/$(BIN).elf: $(OBJS)
26 | @echo LD $@
27 | @$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
28 |
29 | $(BUILD)/$(BIN).hex: $(BUILD)/$(BIN).elf
30 | @echo OBJCOPY $@
31 | @$(OBJCOPY) -O ihex $^ $@
32 |
33 | $(BUILD)/$(BIN).bin: $(BUILD)/$(BIN).elf
34 | @echo OBJCOPY $@
35 | @$(OBJCOPY) -O binary $^ $@
36 |
37 | $(BUILD)/$(BIN).uf2: $(BUILD)/$(BIN).bin
38 | @echo UF2CONV $@
39 | @$(UF2) $^ -co $@
40 |
41 | .phony: $(SUBMODULES)
42 | $(SUBMODULES):
43 | git submodule update --init
44 |
45 | install:
46 | @$(UF2) -D $(BUILD)/$(BIN).uf2
47 |
48 | $(BUILD)/%.o: | $(SUBMODULES) directory
49 | @echo CC $@
50 | @$(CC) $(CFLAGS) $(filter %/$(subst .o,.c,$(notdir $@)), $(SRCS)) -c -o $@
51 |
52 | directory:
53 | @$(MKDIR) -p $(BUILD)
54 |
55 | size: $(BUILD)/$(BIN).elf
56 | @echo size:
57 | @$(SIZE) -t $^
58 |
59 | clean:
60 | @echo clean
61 | @-rm -rf $(BUILD)
62 |
63 | analyze:
64 | @$(COBRA) basic $(INCLUDES) $(DEFINES) $(SRCS)
65 |
66 | DEPFILES := $(OBJS:%.o=%.o.d)
67 |
68 | -include $(wildcard $(DEPFILES))
69 |
--------------------------------------------------------------------------------
/utils/motion_express_utilities/plot.options:
--------------------------------------------------------------------------------
1 | set key autotitle columnhead
2 | set yrange [-40:40]
3 |
--------------------------------------------------------------------------------
/utils/movement_bulk_installer/shipboards.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | RED='\033[0;101m'
3 | GREEN='\033[1;32m'
4 | END='\033[0m'
5 | while [ true ] ; do
6 | echo "Waiting for board"
7 | false
8 | while [ true ] ; do
9 | stat /Volumes/WATCHBOOT &> /dev/null
10 | if [ $? -eq 0 ]
11 | then
12 | break
13 | fi
14 | sleep 0.5
15 | done
16 | sleep 0.5
17 | clear
18 | cp ./standard-red.uf2 /Volumes/WATCHBOOT/
19 | if [ $? -eq 0 ]
20 | then
21 | echo -e "${GREEN}Success!${END} Board flashed successfully!"
22 | else
23 | echo -e "${RED}FAILURE:${END} Board did not flash successfully."
24 | echo -ne '\a'
25 | echo -ne '\a'
26 | fi
27 | while [ true ] ; do
28 | stat /Volumes/WATCHBOOT &> /dev/null
29 | if [ $? -eq 0 ]
30 | then
31 | sleep 0.5
32 | else
33 | break
34 | fi
35 | done
36 | echo -ne '\a'
37 | done
38 |
--------------------------------------------------------------------------------
/utils/movement_bulk_installer/standard-green.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/utils/movement_bulk_installer/standard-green.uf2
--------------------------------------------------------------------------------
/utils/movement_bulk_installer/standard-red.uf2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/utils/movement_bulk_installer/standard-red.uf2
--------------------------------------------------------------------------------
/watch-library/hardware/hal/documentation/ext_irq.rst:
--------------------------------------------------------------------------------
1 | ==============
2 | EXT IRQ driver
3 | ==============
4 |
5 | The External Interrupt driver allows external pins to be
6 | configured as interrupt lines. Each interrupt line can be
7 | individually masked and can generate an interrupt on rising,
8 | falling or both edges, or on high or low levels. Some of
9 | external pin can also be configured to wake up the device
10 | from sleep modes where all clocks have been disabled.
11 | External pins can also generate an event.
12 |
13 | Features
14 | --------
15 | * Initialization and de-initialization
16 | * Enabling and disabling
17 | * Detect external pins interrupt
18 |
19 | Applications
20 | ------------
21 | * Generate an interrupt on rising, falling or both edges,
22 | or on high or low levels.
23 |
24 | Dependencies
25 | ------------
26 | * GPIO hardware
27 |
28 | Concurrency
29 | -----------
30 | N/A
31 |
32 | Limitations
33 | -----------
34 | N/A
35 |
36 | Knows issues and workarounds
37 | ----------------------------
38 | N/A
39 |
40 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/documentation/flash.rst:
--------------------------------------------------------------------------------
1 | The Flash Driver
2 | ================
3 |
4 | Flash is a re-programmable memory that retains program and data
5 | storage even with power off.
6 |
7 | User can write or read several bytes from any valid address in a flash.
8 |
9 | As to the erase/lock/unlock command, the input parameter of address should
10 | be a bytes address aligned with the page start, otherwise, the command will fail
11 | to be executed. At the meantime, the number of pages that can be locked or unlocked
12 | at once depends on region size of the flash. User can get the real number
13 | from the function return value which could be different for the different devices.
14 |
15 | Features
16 | --------
17 |
18 | * Initialization/de-initialization
19 | * Writing/Reading bytes
20 | * Locking/Unlocking/Erasing pages
21 | * Notifications about errors or being ready for a new command
22 |
23 | Applications
24 | ------------
25 |
26 | * Mini disk which can retain program and data storage
27 | * Boot loader
28 | * Non volatile storage
29 |
30 | Dependencies
31 | ------------
32 |
33 | The peripheral which controls a re-programmable flash memory.
34 |
35 | Concurrency
36 | -----------
37 |
38 | N/A
39 |
40 | Limitations
41 | -----------
42 |
43 | User should pay attention to set a proper stack size in their application,
44 | since the driver manages a temporary buffer in stack to cache unchanged data
45 | when calling flash write and erase function.
46 | Due to flash memory architecture of SAMD21/D20/L21/L22/C20/C21/D09/D10/D11/R21,
47 | write operation erazes row content before each write.
48 |
49 | Known issues and workarounds
50 | ----------------------------
51 |
52 | N/A
53 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/documentation/rand_sync.rst:
--------------------------------------------------------------------------------
1 | ==========================================
2 | Random Number Generator Synchronous driver
3 | ==========================================
4 |
5 | Random Number Generator (RAND) generates a sequence of numbers that can not
6 | be reasonably predicted better than by a random chance.
7 |
8 | In some implementation cases, seed is required for the Random Number Generator
9 | to generate random numbers. rand_sync_set_seed is used to update the seed.
10 | If it's actually not required by the generator implementation, the function just
11 | returns ERR_UNSUPPORTED_OP.
12 |
13 | Features
14 | --------
15 |
16 | * Initialization and de-initialization
17 | * Enabling and Disabling
18 | * Setting seed
19 | * 8-bit and 32-bit random data/data array generation
20 |
21 | Applications
22 | ------------
23 |
24 | * Generate random keys for data encryption
25 |
26 | Dependencies
27 | ------------
28 |
29 | * Random number generation hardware/software
30 |
31 | Concurrency
32 | -----------
33 | N/A
34 |
35 | Limitations
36 | -----------
37 |
38 | N/A
39 |
40 | Known issues and workarounds
41 | ----------------------------
42 | N/A
43 |
44 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/documentation/spi_master_sync.rst:
--------------------------------------------------------------------------------
1 | The SPI Master Synchronous Driver
2 | =================================
3 |
4 | The serial peripheral interface (SPI) is a synchronous serial communication
5 | interface.
6 |
7 | SPI devices communicate in full duplex mode using a master-slave
8 | architecture with a single master. The master device originates the frame for
9 | reading and writing. Multiple slave devices are supported through selection
10 | with individual slave select (SS) lines.
11 |
12 | Features
13 | --------
14 |
15 | * Initialization/de-initialization
16 | * Enabling/disabling
17 | * Control of the following settings:
18 |
19 | * Baudrate
20 | * SPI mode
21 | * Character size
22 | * Data order
23 | * Data transfer: transmission, reception and full-duplex
24 |
25 | Applications
26 | ------------
27 |
28 | Send/receive/exchange data with a SPI slave device. E.g., serial flash, SD card,
29 | LCD controller, etc.
30 |
31 | Dependencies
32 | ------------
33 |
34 | SPI master capable hardware
35 |
36 | Concurrency
37 | -----------
38 |
39 | N/A
40 |
41 | Limitations
42 | -----------
43 |
44 | The slave select (SS) is not automatically inserted during read/write/transfer,
45 | user must use I/O to control the devices' SS.
46 |
47 | Known issues and workarounds
48 | ----------------------------
49 |
50 | N/A
51 |
52 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/documentation/usart_sync.rst:
--------------------------------------------------------------------------------
1 | The USART Synchronous Driver
2 | ============================
3 |
4 | The universal synchronous and asynchronous receiver and transmitter
5 | (USART) is usually used to transfer data from one device to the other.
6 |
7 | User can set action for flow control pins by function usart_set_flow_control,
8 | if the flow control is enabled. All the available states are defined in union
9 | usart_flow_control_state.
10 |
11 | Note that user can set state of flow control pins only if automatic support of
12 | the flow control is not supported by the hardware.
13 |
14 | Features
15 | --------
16 |
17 | * Initialization/de-initialization
18 | * Enabling/disabling
19 | * Control of the following settings:
20 |
21 | * Baudrate
22 | * UART or USRT communication mode
23 | * Character size
24 | * Data order
25 | * Flow control
26 | * Data transfer: transmission, reception
27 |
28 | Applications
29 | ------------
30 |
31 | They are commonly used in a terminal application or low-speed communication
32 | between devices.
33 |
34 | Dependencies
35 | ------------
36 |
37 | USART capable hardware.
38 |
39 | Concurrency
40 | -----------
41 |
42 | Write buffer should not be changed while data is being sent.
43 |
44 |
45 | Limitations
46 | -----------
47 |
48 | * The driver does not support 9-bit character size.
49 | * The "USART with ISO7816" mode can be only used in ISO7816 capable devices.
50 | And the SCK pin can't be set directly. Application can use a GCLK output PIN
51 | to generate SCK. For example to communicate with a SMARTCARD with ISO7816
52 | (F = 372 ; D = 1), and baudrate=9600, the SCK pin output frequency should be
53 | config as 372*9600=3571200Hz. More information can be refer to ISO7816 Specification.
54 |
55 | Known issues and workarounds
56 | ----------------------------
57 |
58 | N/A
59 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/include/hal_calendar.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/watch-library/hardware/hal/include/hal_calendar.h
--------------------------------------------------------------------------------
/watch-library/hardware/hal/include/hal_init.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief HAL initialization related functionality declaration.
5 | *
6 | * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #ifndef _HAL_INIT_H_INCLUDED
35 | #define _HAL_INIT_H_INCLUDED
36 |
37 | #include
38 |
39 | #ifdef __cplusplus
40 | extern "C" {
41 | #endif
42 |
43 | /**
44 | * \addtogroup doc_driver_hal_helper_init Init Driver
45 | *
46 | *@{
47 | */
48 |
49 | /**
50 | * \brief Initialize the hardware abstraction layer
51 | *
52 | * This function calls the various initialization functions.
53 | * Currently the following initialization functions are supported:
54 | * - System clock initialization
55 | */
56 | static inline void init_mcu(void)
57 | {
58 | _init_chip();
59 | }
60 |
61 | /**
62 | * \brief Retrieve the current driver version
63 | *
64 | * \return Current driver version.
65 | */
66 | uint32_t init_get_version(void);
67 |
68 | /**@}*/
69 | #ifdef __cplusplus
70 | }
71 | #endif
72 | #endif /* _HAL_INIT_H_INCLUDED */
73 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/include/hpl_calendar.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Generic CALENDAR functionality declaration.
5 | *
6 | * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 | #ifndef _HPL_CALENDER_H_INCLUDED
34 | #define _HPL_CALENDER_H_INCLUDED
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | /**
41 | * \brief Time struct for calendar
42 | */
43 | struct calendar_time {
44 | /*range from 0 to 59*/
45 | uint8_t sec;
46 | /*range from 0 to 59*/
47 | uint8_t min;
48 | /*range from 0 to 23*/
49 | uint8_t hour;
50 | };
51 |
52 | /**
53 | * \brief Time struct for calendar
54 | */
55 | struct calendar_date {
56 | /*range from 1 to 28/29/30/31*/
57 | uint8_t day;
58 | /*range from 1 to 12*/
59 | uint8_t month;
60 | /*absolute year>= 1970(such as 2000)*/
61 | uint16_t year;
62 | };
63 |
64 | /** \brief Date&Time struct for calendar
65 | */
66 | struct calendar_date_time {
67 | struct calendar_time time;
68 | struct calendar_date date;
69 | };
70 |
71 | #ifdef __cplusplus
72 | }
73 | #endif
74 |
75 | #endif /* _HPL_RTC_H_INCLUDED */
76 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/include/hpl_core.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief CPU core related functionality declaration.
5 | *
6 | * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #ifndef _HPL_CORE_H_INCLUDED
35 | #define _HPL_CORE_H_INCLUDED
36 |
37 | /**
38 | * \addtogroup HPL Core
39 | *
40 | * \section hpl_core_rev Revision History
41 | * - v1.0.0 Initial Release
42 | *
43 | *@{
44 | */
45 |
46 | #include "hpl_core_port.h"
47 |
48 | #ifdef __cplusplus
49 | extern "C" {
50 | #endif
51 |
52 | #ifdef __cplusplus
53 | }
54 | #endif
55 | /**@}*/
56 | #endif /* _HPL_CORE_H_INCLUDED */
57 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/include/hpl_missing_features.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Family-dependent missing features expected by HAL
5 | *
6 | * Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #ifndef _HPL_MISSING_FEATURES
35 | #define _HPL_MISSING_FEATURES
36 |
37 | #endif /* _HPL_MISSING_FEATURES */
38 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/include/hpl_slcd.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief SLCD common declaration.
5 | *
6 | * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #ifndef HPL_SLCD_H_INCLUDED
35 | #define HPL_SLCD_H_INCLUDED
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | #define SLCD_SEGID(com, seg) (((com) << 16) | (seg))
42 | #define SLCD_COMNUM(segid) (((segid) >> 16) & 0xFF)
43 | #define SLCD_SEGNUM(segid) ((segid)&0xFF)
44 |
45 | #ifdef __cplusplus
46 | }
47 | #endif
48 |
49 | #endif /* HPL_SLCD_H_INCLUDED */
50 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/include/hpl_spi_sync.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Common SPI related functionality declaration.
5 | *
6 | * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #ifndef _HPL_SPI_SYNC_H_INCLUDED
35 | #define _HPL_SPI_SYNC_H_INCLUDED
36 |
37 | #include
38 | #include
39 |
40 | #include
41 |
42 | /**
43 | * \addtogroup hpl_spi HPL SPI
44 | *
45 | * \section hpl_spi_rev Revision History
46 | * - v1.0.0 Initial Release
47 | *
48 | *@{
49 | */
50 |
51 | #ifdef __cplusplus
52 | extern "C" {
53 | #endif
54 |
55 | /** SPI driver to support sync HAL */
56 | struct _spi_sync_dev {
57 | /** Pointer to the hardware base or private data for special device. */
58 | void *prvt;
59 | /** Data size, number of bytes for each character */
60 | uint8_t char_size;
61 | /** Dummy byte used in master mode when reading the slave */
62 | uint16_t dummy_byte;
63 | };
64 |
65 | #ifdef __cplusplus
66 | }
67 | #endif
68 |
69 | /**@}*/
70 | #endif /* ifndef _HPL_SPI_SYNC_H_INCLUDED */
71 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/src/hal_atomic.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Critical sections related functionality implementation.
5 | *
6 | * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #include "hal_atomic.h"
35 |
36 | /**
37 | * \brief Driver version
38 | */
39 | #define DRIVER_VERSION 0x00000001u
40 |
41 | /**
42 | * \brief Disable interrupts, enter critical section
43 | */
44 | void atomic_enter_critical(hal_atomic_t volatile *atomic)
45 | {
46 | *atomic = __get_PRIMASK();
47 | __disable_irq();
48 | __DMB();
49 | }
50 |
51 | /**
52 | * \brief Exit atomic section
53 | */
54 | void atomic_leave_critical(hal_atomic_t volatile *atomic)
55 | {
56 | __DMB();
57 | __set_PRIMASK(*atomic);
58 | }
59 |
60 | /**
61 | * \brief Retrieve the current driver version
62 | */
63 | uint32_t atomic_get_version(void)
64 | {
65 | return DRIVER_VERSION;
66 | }
67 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/src/hal_calendar.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joeycastillo/Sensor-Watch/8c39d428247edba25ee17bcb45a4c919b4466d71/watch-library/hardware/hal/src/hal_calendar.c
--------------------------------------------------------------------------------
/watch-library/hardware/hal/src/hal_gpio.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Port
5 | *
6 | * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #include "hal_gpio.h"
35 |
36 | /**
37 | * \brief Driver version
38 | */
39 | #define DRIVER_VERSION 0x00000001u
40 |
41 | uint32_t gpio_get_version(void)
42 | {
43 | return DRIVER_VERSION;
44 | }
45 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/src/hal_init.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief HAL initialization related functionality implementation.
5 | *
6 | * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #include "hal_init.h"
35 |
36 | /**
37 | * \brief Driver version
38 | */
39 | #define HAL_INIT_VERSION 0x00000001u
40 |
41 | /**
42 | * \brief Retrieve the current driver version
43 | */
44 | uint32_t init_get_version(void)
45 | {
46 | return HAL_INIT_VERSION;
47 | }
48 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/src/hal_io.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief I/O functionality implementation.
5 | *
6 | * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #include
35 | #include
36 |
37 | /**
38 | * \brief Driver version
39 | */
40 | #define DRIVER_VERSION 0x00000001u
41 |
42 | /**
43 | * \brief I/O write interface
44 | */
45 | int32_t io_write(struct io_descriptor *const io_descr, const uint8_t *const buf, const uint16_t length)
46 | {
47 | ASSERT(io_descr && buf);
48 | return io_descr->write(io_descr, buf, length);
49 | }
50 |
51 | /**
52 | * \brief I/O read interface
53 | */
54 | int32_t io_read(struct io_descriptor *const io_descr, uint8_t *const buf, const uint16_t length)
55 | {
56 | ASSERT(io_descr && buf);
57 | return io_descr->read(io_descr, buf, length);
58 | }
59 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/utils/include/compiler.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Header
5 | *
6 | * Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 | /*
34 | * Support and FAQ: visit Microchip Support
35 | */
36 |
37 | /******************************************************************************
38 | * compiler.h
39 | *
40 | * Created: 05.05.2014
41 | * Author: N. Fomin
42 | ******************************************************************************/
43 |
44 | #ifndef _COMPILER_H
45 | #define _COMPILER_H
46 |
47 | #ifdef __cplusplus
48 | extern "C" {
49 | #endif
50 |
51 | #include
52 | #include
53 | #include
54 |
55 | #ifndef __EMSCRIPTEN__
56 | #ifndef _UNIT_TEST_
57 | #include "parts.h"
58 | #endif
59 | #endif
60 | #include "err_codes.h"
61 |
62 | #ifdef __cplusplus
63 | }
64 | #endif
65 |
66 | #endif /* _COMPILER_H */
67 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/utils/include/events.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Events declaration.
5 | *
6 | * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #ifndef _EVENTS_H_INCLUDED
35 | #define _EVENTS_H_INCLUDED
36 |
37 | #ifdef __cplusplus
38 | extern "C" {
39 | #endif
40 |
41 | #include
42 |
43 | /**
44 | * \brief List of events. Must start with 0, be unique and follow numerical order.
45 | */
46 | #define EVENT_IS_READY_TO_SLEEP_ID 0
47 | #define EVENT_PREPARE_TO_SLEEP_ID 1
48 | #define EVENT_WOKEN_UP_ID 2
49 |
50 | #ifdef __cplusplus
51 | }
52 | #endif
53 |
54 | #endif /* _EVENTS_H_INCLUDED */
55 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/utils/include/parts.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Atmel part identification macros
5 | *
6 | * Copyright (c) 2015-2019 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #ifndef ATMEL_PARTS_H
35 | #define ATMEL_PARTS_H
36 |
37 | #include "saml22.h"
38 |
39 | #include "hri_l22.h"
40 |
41 | #endif /* ATMEL_PARTS_H */
42 |
--------------------------------------------------------------------------------
/watch-library/hardware/hal/utils/src/utils_assert.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Asserts related functionality.
5 | *
6 | * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #include
35 |
36 | /**
37 | * \brief Assert function
38 | */
39 | void assert(const bool condition, const char *const file, const int line)
40 | {
41 | if (!(condition)) {
42 | __asm("BKPT #0");
43 | }
44 | (void)file;
45 | (void)line;
46 | }
47 |
--------------------------------------------------------------------------------
/watch-library/hardware/hpl/core/hpl_core_port.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Core related functionality implementation.
5 | *
6 | * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #ifndef _HPL_CORE_PORT_H_INCLUDED
35 | #define _HPL_CORE_PORT_H_INCLUDED
36 |
37 | #include
38 |
39 | /* It's possible to include this file in ARM ASM files (e.g., in FreeRTOS IAR
40 | * portable implement, portasm.s -> FreeRTOSConfig.h -> hpl_core_port.h),
41 | * there will be assembling errors.
42 | * So the following things are not included for assembling.
43 | */
44 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
45 |
46 | #ifndef _UNIT_TEST_
47 | #include
48 | #endif
49 |
50 | /**
51 | * \brief Check if it's in ISR handling
52 | * \return \c true if it's in ISR
53 | */
54 | static inline bool _is_in_isr(void)
55 | {
56 | return (SCB->ICSR & SCB_ICSR_VECTACTIVE_Msk);
57 | }
58 |
59 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
60 |
61 | void Default_Handler(void);
62 |
63 | #endif /* _HPL_CORE_PORT_H_INCLUDED */
64 |
--------------------------------------------------------------------------------
/watch-library/hardware/hpl/mclk/hpl_mclk.c:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief SAM Main Clock.
5 | *
6 | * Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | *
32 | */
33 |
34 | #include
35 | #include
36 | #include
37 |
38 | /**
39 | * \brief Initialize master clock generator
40 | */
41 | void _mclk_init(void)
42 | {
43 | void *hw = (void *)MCLK;
44 | hri_mclk_write_BUPDIV_reg(hw, MCLK_BUPDIV_BUPDIV(CONF_MCLK_BUPDIV));
45 | hri_mclk_write_CPUDIV_reg(hw, MCLK_CPUDIV_CPUDIV(CONF_MCLK_CPUDIV));
46 | }
47 |
--------------------------------------------------------------------------------
/watch-library/hardware/hpl/pm/hpl_pm_base.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief SAM Power manager
5 | *
6 | * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * Subject to your compliance with these terms, you may use Microchip
13 | * software and any derivatives exclusively with Microchip products.
14 | * It is your responsibility to comply with third party license terms applicable
15 | * to your use of third party software (including open source software) that
16 | * may accompany Microchip software.
17 | *
18 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES,
19 | * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE,
20 | * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY,
21 | * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE
22 | * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL
23 | * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE
24 | * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE
25 | * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT
26 | * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY
27 | * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
28 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
29 | *
30 | * \asf_license_stop
31 | */
32 |
33 | #ifndef _HPL_PM_BASE_H_INCLUDED
34 | #define _HPL_PM_BASE_H_INCLUDED
35 |
36 | #ifdef __cplusplus
37 | extern "C" {
38 | #endif
39 |
40 | #include
41 |
42 | #ifdef __cplusplus
43 | }
44 | #endif
45 | #endif /* _HPL_PM_BASE_H_INCLUDED */
46 |
--------------------------------------------------------------------------------
/watch-library/hardware/hw/driver_init.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Code generated from Atmel Start.
3 | *
4 | * This file will be overwritten when reconfiguring your Atmel Start project.
5 | * Please copy examples or other code you want to keep to a separate file
6 | * to avoid losing it when reconfiguring.
7 | */
8 | #ifndef DRIVER_INIT_INCLUDED
9 | #define DRIVER_INIT_INCLUDED
10 |
11 | #define GPIO_PIN_FUNCTION_A 0
12 | #define GPIO_PIN_FUNCTION_B 1
13 | #define GPIO_PIN_FUNCTION_C 2
14 | #define GPIO_PIN_FUNCTION_D 3
15 | #define GPIO_PIN_FUNCTION_E 4
16 | #define GPIO_PIN_FUNCTION_F 5
17 | #define GPIO_PIN_FUNCTION_G 6
18 | #define GPIO_PIN_FUNCTION_H 7
19 | #define GPIO_PIN_FUNCTION_I 8
20 |
21 | #include "pins.h"
22 |
23 | #ifdef __cplusplus
24 | extern "C" {
25 | #endif
26 |
27 | #include
28 | #include
29 | #include
30 | #include
31 | #include
32 | #include
33 | #include
34 | #include
35 | #include
36 | #include
37 | #include
38 | #include
39 |
40 | extern struct adc_sync_descriptor ADC_0;
41 |
42 | extern struct i2c_m_sync_desc I2C_0;
43 |
44 | extern struct usart_sync_descriptor USART_0;
45 |
46 | extern struct spi_m_sync_descriptor SPI_0;
47 |
48 | extern struct slcd_sync_descriptor SEGMENT_LCD_0;
49 |
50 | void I2C_0_CLOCK_init(void);
51 | void I2C_0_init(void);
52 | void I2C_0_PORT_init(void);
53 |
54 | void SPI_0_PORT_init(void);
55 | void SPI_0_CLOCK_init(void);
56 | void SPI_0_init(void);
57 |
58 | void delay_driver_init(void);
59 |
60 | void EXTERNAL_IRQ_0_init(void);
61 |
62 | void SEGMENT_LCD_0_PORT_init(void);
63 | void SEGMENT_LCD_0_init(void);
64 |
65 | #ifdef __cplusplus
66 | }
67 | #endif
68 | #endif // DRIVER_INIT_INCLUDED
69 |
--------------------------------------------------------------------------------
/watch-library/hardware/include/component-version.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Component version header file
5 | *
6 | * Copyright (c) 2018 Atmel Corporation, a wholly owned subsidiary of Microchip Technology Inc.
7 | *
8 | * \license_start
9 | *
10 | * \page License
11 | *
12 | * Licensed under the Apache License, Version 2.0 (the "License");
13 | * you may not use this file except in compliance with the License.
14 | * You may obtain a copy of the License at
15 | *
16 | * http://www.apache.org/licenses/LICENSE-2.0
17 | *
18 | * Unless required by applicable law or agreed to in writing, software
19 | * distributed under the License is distributed on an "AS IS" BASIS,
20 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 | * See the License for the specific language governing permissions and
22 | * limitations under the License.
23 | *
24 | * \license_stop
25 | *
26 | */
27 |
28 | #ifndef _COMPONENT_VERSION_H_INCLUDED
29 | #define _COMPONENT_VERSION_H_INCLUDED
30 |
31 | #define COMPONENT_VERSION_MAJOR 1
32 | #define COMPONENT_VERSION_MINOR 2
33 |
34 | //
35 | // The COMPONENT_VERSION define is composed of the major and the minor version number.
36 | //
37 | // The last four digits of the COMPONENT_VERSION is the minor version with leading zeros.
38 | // The rest of the COMPONENT_VERSION is the major version.
39 | //
40 | #define COMPONENT_VERSION 10002
41 |
42 | //
43 | // The build number does not refer to the component, but to the build number
44 | // of the device pack that provides the component.
45 | //
46 | #define BUILD_NUMBER 77
47 |
48 | //
49 | // The COMPONENT_VERSION_STRING is a string (enclosed in ") that can be used for logging or embedding.
50 | //
51 | #define COMPONENT_VERSION_STRING "1.2"
52 |
53 | //
54 | // The COMPONENT_DATE_STRING contains a timestamp of when the pack was generated.
55 | //
56 | // The COMPONENT_DATE_STRING is written out using the following strftime pattern.
57 | //
58 | // "%Y-%m-%d %H:%M:%S"
59 | //
60 | //
61 | #define COMPONENT_DATE_STRING "2018-08-31 15:05:02"
62 |
63 | #endif/* #ifndef _COMPONENT_VERSION_H_INCLUDED */
64 |
65 |
--------------------------------------------------------------------------------
/watch-library/hardware/include/instance/ptc.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Instance description for PTC
5 | *
6 | * Copyright (c) 2018 Microchip Technology Inc.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * SPDX-License-Identifier: Apache-2.0
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
15 | * not use this file except in compliance with the License.
16 | * You may obtain a copy of the Licence at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
22 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | *
26 | * \asf_license_stop
27 | *
28 | */
29 |
30 | #ifndef _SAML22_PTC_INSTANCE_
31 | #define _SAML22_PTC_INSTANCE_
32 |
33 | /* ========== Instance parameters for PTC peripheral ========== */
34 | #define PTC_DMAC_ID_EOC 37 // Index of DMA EOC trigger
35 | #define PTC_DMAC_ID_SEQ 38 // Index of DMA SEQ trigger
36 | #define PTC_DMAC_ID_WCOMP 39 // Index of DMA WCOMP trigger
37 | #define PTC_GCLK_ID 27 // Index of Generic Clock
38 | #define PTC_LINES_MSB 31
39 | #define PTC_LINES_NUM 32 // Number of PTC lines
40 | #define PTC_Y_LINES_MSB 23
41 | #define PTC_Y_LINES_NUM 24 // Number of Y lines
42 |
43 | #endif /* _SAML22_PTC_INSTANCE_ */
44 |
--------------------------------------------------------------------------------
/watch-library/hardware/include/instance/rstc.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Instance description for RSTC
5 | *
6 | * Copyright (c) 2018 Microchip Technology Inc.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * SPDX-License-Identifier: Apache-2.0
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
15 | * not use this file except in compliance with the License.
16 | * You may obtain a copy of the Licence at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
22 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | *
26 | * \asf_license_stop
27 | *
28 | */
29 |
30 | #ifndef _SAML22_RSTC_INSTANCE_
31 | #define _SAML22_RSTC_INSTANCE_
32 |
33 | /* ========== Register definition for RSTC peripheral ========== */
34 | #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
35 | #define REG_RSTC_RCAUSE (0x40000C00) /**< \brief (RSTC) Reset Cause */
36 | #define REG_RSTC_BKUPEXIT (0x40000C02) /**< \brief (RSTC) Backup Exit Source */
37 | #else
38 | #define REG_RSTC_RCAUSE (*(RoReg8 *)0x40000C00UL) /**< \brief (RSTC) Reset Cause */
39 | #define REG_RSTC_BKUPEXIT (*(RoReg8 *)0x40000C02UL) /**< \brief (RSTC) Backup Exit Source */
40 | #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
41 |
42 | /* ========== Instance parameters for RSTC peripheral ========== */
43 | #define RSTC_BACKUP_IMPLEMENTED 1
44 | #define RSTC_NUMBER_OF_EXTWAKE 0 // number of external wakeup line
45 |
46 | #endif /* _SAML22_RSTC_INSTANCE_ */
47 |
--------------------------------------------------------------------------------
/watch-library/hardware/include/sam.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Top level header file
5 | *
6 | * Copyright (c) 2018 Microchip Technology Inc.
7 | *
8 | * \license_start
9 | *
10 | * \page License
11 | *
12 | * SPDX-License-Identifier: Apache-2.0
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | *
26 | * \license_stop
27 | *
28 | */
29 |
30 | #ifndef _SAM_
31 | #define _SAM_
32 |
33 | #if defined(__SAML22G16A__) || defined(__ATSAML22G16A__)
34 | #include "saml22g16a.h"
35 | #elif defined(__SAML22G17A__) || defined(__ATSAML22G17A__)
36 | #include "saml22g17a.h"
37 | #elif defined(__SAML22G18A__) || defined(__ATSAML22G18A__)
38 | #include "saml22g18a.h"
39 | #elif defined(__SAML22J16A__) || defined(__ATSAML22J16A__)
40 | #include "saml22j16a.h"
41 | #elif defined(__SAML22J17A__) || defined(__ATSAML22J17A__)
42 | #include "saml22j17a.h"
43 | #elif defined(__SAML22J18A__) || defined(__ATSAML22J18A__)
44 | #include "saml22j18a.h"
45 | #elif defined(__SAML22N16A__) || defined(__ATSAML22N16A__)
46 | #include "saml22n16a.h"
47 | #elif defined(__SAML22N17A__) || defined(__ATSAML22N17A__)
48 | #include "saml22n17a.h"
49 | #elif defined(__SAML22N18A__) || defined(__ATSAML22N18A__)
50 | #include "saml22n18a.h"
51 | #else
52 | #error Library does not support the specified device
53 | #endif
54 |
55 | #endif /* _SAM_ */
56 |
--------------------------------------------------------------------------------
/watch-library/hardware/include/saml22.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Top header file for SAML22
5 | *
6 | * Copyright (c) 2018 Microchip Technology Inc.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * SPDX-License-Identifier: Apache-2.0
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
15 | * not use this file except in compliance with the License.
16 | * You may obtain a copy of the Licence at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
22 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | *
26 | * \asf_license_stop
27 | *
28 | */
29 |
30 | #ifndef _SAML22_
31 | #define _SAML22_
32 |
33 | /**
34 | * \defgroup SAML22_definitions SAML22 Device Definitions
35 | * \brief SAML22 CMSIS Definitions.
36 | */
37 |
38 | #if defined(__SAML22G16A__) || defined(__ATSAML22G16A__)
39 | #include "saml22g16a.h"
40 | #elif defined(__SAML22G17A__) || defined(__ATSAML22G17A__)
41 | #include "saml22g17a.h"
42 | #elif defined(__SAML22G18A__) || defined(__ATSAML22G18A__)
43 | #include "saml22g18a.h"
44 | #elif defined(__SAML22J16A__) || defined(__ATSAML22J16A__)
45 | #include "saml22j16a.h"
46 | #elif defined(__SAML22J17A__) || defined(__ATSAML22J17A__)
47 | #include "saml22j17a.h"
48 | #elif defined(__SAML22J18A__) || defined(__ATSAML22J18A__)
49 | #include "saml22j18a.h"
50 | #elif defined(__SAML22N16A__) || defined(__ATSAML22N16A__)
51 | #include "saml22n16a.h"
52 | #elif defined(__SAML22N17A__) || defined(__ATSAML22N17A__)
53 | #include "saml22n17a.h"
54 | #elif defined(__SAML22N18A__) || defined(__ATSAML22N18A__)
55 | #include "saml22n18a.h"
56 | #else
57 | #error Library does not support the specified device.
58 | #endif
59 |
60 | #endif /* _SAML22_ */
61 |
--------------------------------------------------------------------------------
/watch-library/hardware/include/system_saml22.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Low-level initialization functions called upon chip startup
5 | *
6 | * Copyright (c) 2018 Microchip Technology Inc.
7 | *
8 | * \asf_license_start
9 | *
10 | * \page License
11 | *
12 | * SPDX-License-Identifier: Apache-2.0
13 | *
14 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
15 | * not use this file except in compliance with the License.
16 | * You may obtain a copy of the Licence at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an AS IS BASIS, WITHOUT
22 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | *
26 | * \asf_license_stop
27 | *
28 | */
29 |
30 | #ifndef _SYSTEM_SAML22_H_INCLUDED_
31 | #define _SYSTEM_SAML22_H_INCLUDED_
32 |
33 | #ifdef __cplusplus
34 | extern "C" {
35 | #endif
36 |
37 | #include
38 |
39 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
40 |
41 | void SystemInit(void);
42 | void SystemCoreClockUpdate(void);
43 |
44 | #ifdef __cplusplus
45 | }
46 | #endif
47 |
48 | #endif /* SYSTEM_SAML22_H_INCLUDED */
49 |
--------------------------------------------------------------------------------
/watch-library/hardware/watch/watch_private_cdc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2020 Joey Castillo
5 | * Copyright (c) 2023 Edward Shin
6 | *
7 | * Permission is hereby granted, free of charge, to any person obtaining a copy
8 | * of this software and associated documentation files (the "Software"), to deal
9 | * in the Software without restriction, including without limitation the rights
10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | * copies of the Software, and to permit persons to whom the Software is
12 | * furnished to do so, subject to the following conditions:
13 | *
14 | * The above copyright notice and this permission notice shall be included in all
15 | * copies or substantial portions of the Software.
16 | *
17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 | * SOFTWARE.
24 | */
25 |
26 | #ifndef _WATCH_PRIVATE_CDC_H_INCLUDED
27 | #define _WATCH_PRIVATE_CDC_H_INCLUDED
28 |
29 | int _write(int file, char *ptr, int len);
30 | int _read(int file, char *ptr, int len);
31 | void cdc_task(void);
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/watch-library/hardware/watch/watch_spi.c:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #include "watch_spi.h"
26 |
27 | struct io_descriptor *spi_io;
28 |
29 | void watch_enable_spi(void) {
30 | SPI_0_init();
31 | spi_m_sync_get_io_descriptor(&SPI_0, &spi_io);
32 | spi_m_sync_enable(&SPI_0);
33 | }
34 |
35 | void watch_disable_spi(void) {
36 | spi_m_sync_disable(&SPI_0);
37 | spi_io = NULL;
38 | }
39 |
40 | bool watch_spi_write(const uint8_t *buf, uint16_t length) {
41 | return !!io_write(spi_io, buf, length);
42 | }
43 |
44 | bool watch_spi_read(uint8_t *buf, uint16_t length) {
45 | return !!io_read(spi_io, buf, length);
46 | }
47 |
48 | bool watch_spi_transfer(const uint8_t *data_out, uint8_t *data_in, uint16_t length) {
49 | struct spi_xfer xfer;
50 | xfer.txbuf = (uint8_t *)data_out;
51 | xfer.rxbuf = data_in;
52 | xfer.size = length;
53 | return !!spi_m_sync_transfer(&SPI_0, &xfer);
54 | }
55 |
--------------------------------------------------------------------------------
/watch-library/shared/config/RTE_Components.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * \brief Autogenerated API include file for the Atmel Configuration Management Engine (ACME)
5 | *
6 | * Copyright (c) 2012 Atmel Corporation. All rights reserved.
7 | *
8 | * \acme_license_start
9 | *
10 | * \page License
11 | *
12 | * Redistribution and use in source and binary forms, with or without
13 | * modification, are permitted provided that the following conditions are met:
14 | *
15 | * 1. Redistributions of source code must retain the above copyright notice,
16 | * this list of conditions and the following disclaimer.
17 | *
18 | * 2. Redistributions in binary form must reproduce the above copyright notice,
19 | * this list of conditions and the following disclaimer in the documentation
20 | * and/or other materials provided with the distribution.
21 | *
22 | * 3. The name of Atmel may not be used to endorse or promote products derived
23 | * from this software without specific prior written permission.
24 | *
25 | * 4. This software may only be redistributed and used in connection with an
26 | * Atmel microcontroller product.
27 | *
28 | * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
29 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
31 | * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
32 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
36 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
37 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 | * POSSIBILITY OF SUCH DAMAGE.
39 | *
40 | * \acme_license_stop
41 | *
42 | * Project: My Project
43 | * Target: ATSAML22J18A
44 | *
45 | **/
46 |
47 |
48 | #ifndef RTE_COMPONENTS_H
49 | #define RTE_COMPONENTS_H
50 |
51 |
52 | #define ATMEL_START
53 |
54 | #endif /* RTE_COMPONENTS_H */
55 |
--------------------------------------------------------------------------------
/watch-library/shared/config/hpl_nvmctrl_config.h:
--------------------------------------------------------------------------------
1 | /* Auto-generated config file hpl_nvmctrl_config.h */
2 | #ifndef HPL_NVMCTRL_CONFIG_H
3 | #define HPL_NVMCTRL_CONFIG_H
4 |
5 | // <<< Use Configuration Wizard in Context Menu >>>
6 |
7 | // Basic Settings
8 |
9 | // Read Mode Selection
10 | // <0x00=> No Miss Penalty
11 | // <0x01=> Low Power
12 | // <0x02=> Deterministic
13 | // nvm_arch_read_mode
14 | #ifndef CONF_NVM_READ_MODE
15 | #define CONF_NVM_READ_MODE 1
16 | #endif
17 |
18 | // Power Reduction Mode During Sleep
19 | // <0x00=> Wake On Access
20 | // <0x01=> Wake Up Instant
21 | // <0x03=> Disabled
22 | // nvm_arch_sleepprm
23 | #ifndef CONF_NVM_SLEEPPRM
24 | #define CONF_NVM_SLEEPPRM 0
25 | #endif
26 |
27 | // Cache Disable
28 | // Indicate whether cache is disable or not
29 | // nvm_arch_cache
30 | #ifndef CONF_NVM_CACHE
31 | #define CONF_NVM_CACHE 0
32 | #endif
33 |
34 | //
35 |
36 | // <<< end of configuration section >>>
37 |
38 | #endif // HPL_NVMCTRL_CONFIG_H
39 |
--------------------------------------------------------------------------------
/watch-library/shared/config/hpl_systick_config.h:
--------------------------------------------------------------------------------
1 | /* Auto-generated config file hpl_systick_config.h */
2 | #ifndef HPL_SYSTICK_CONFIG_H
3 | #define HPL_SYSTICK_CONFIG_H
4 |
5 | // <<< Use Configuration Wizard in Context Menu >>>
6 |
7 | // Advanced settings
8 | // SysTick exception request
9 | // Indicates whether the generation of SysTick exception is enabled or not
10 | // systick_arch_tickint
11 | #ifndef CONF_SYSTICK_TICKINT
12 | #define CONF_SYSTICK_TICKINT 0
13 | #endif
14 | //
15 |
16 | // <<< end of configuration section >>>
17 |
18 | #endif // HPL_SYSTICK_CONFIG_H
19 |
--------------------------------------------------------------------------------
/watch-library/shared/config/hpl_trng_config.h:
--------------------------------------------------------------------------------
1 | /* Auto-generated config file hpl_trng_config.h */
2 | #ifndef HPL_TRNG_CONFIG_H
3 | #define HPL_TRNG_CONFIG_H
4 |
5 | // <<< Use Configuration Wizard in Context Menu >>>
6 |
7 | // Advanced configurations
8 |
9 | // Run In Standby
10 | // Indicates whether the TRNG works in standby mode
11 | // trng_runstdby
12 | #ifndef CONF_TRNG_RUNSTDBY
13 | #define CONF_TRNG_RUNSTDBY 0
14 | #endif
15 |
16 | // Data Ready Event Output Enable
17 | // Indicates whether the TRNG generates event on Data Ready
18 | // trng_datardyeo
19 | #ifndef CONF_TRNG_DATARDYEO
20 | #define CONF_TRNG_DATARDYEO 0
21 | #endif
22 |
23 | //
24 |
25 | // <<< end of configuration section >>>
26 |
27 | #endif // HPL_TRNG_CONFIG_H
28 |
--------------------------------------------------------------------------------
/watch-library/shared/config/nv_storage_config.h:
--------------------------------------------------------------------------------
1 | /* Auto-generated config file nv_storage_config.h */
2 | #ifndef NV_STORAGE_CONFIG_H
3 | #define NV_STORAGE_CONFIG_H
4 |
5 | // <<< Use Configuration Wizard in Context Menu >>>
6 |
7 | // Storage start address <0x00000000-0xFFFFFFFF>
8 | // This defines the start address of device flash for storage.
9 | // The start address should be in device flash area.
10 | // The start address and (start address + Item Number * Sector size) cannot beyond device flash area.
11 | // conf_storage_memory_start
12 | #ifndef CONF_STORAGE_MEMORY_START
13 | #define CONF_STORAGE_MEMORY_START 0x10000
14 | #endif
15 |
16 | // Item number <0-65535>
17 | // This defines the maximum number of elements stored in persistent storage
18 | // conf_max_item_number
19 | #ifndef CONF_MAX_ITEM_NUMBER
20 | #define CONF_MAX_ITEM_NUMBER 10
21 | #endif
22 |
23 | // Sector size <0-65535>
24 | // This defines the size of one storage sector in bytes
25 | // conf_sector_size
26 | #ifndef CONF_SECTOR_SIZE
27 | #define CONF_SECTOR_SIZE 4096
28 | #endif
29 |
30 | /**
31 | * Check If the Storage configuration out of the flash area.
32 | */
33 | #ifdef FLASH_SIZE
34 | #if (CONF_STORAGE_MEMORY_START + (SECTOR_AMOUNT * CONF_SECTOR_SIZE)) > FLASH_SIZE
35 | #error Invalidate storage configuration, make sure the configuration with \
36 | the sector start address (CONF_STORAGE_MEMORY_START) and sector size (CONF_SECTOR_SIZE) \
37 | are located within the device flash size.
38 | #endif
39 | #endif
40 |
41 | #ifdef IFLASH_SIZE
42 | #if (CONF_STORAGE_MEMORY_START + (SECTOR_AMOUNT * CONF_SECTOR_SIZE)) > IFLASH_SIZE
43 | #error Invalidate storage configuration, make sure the configuration with \
44 | the sector start address (CONF_STORAGE_MEMORY_START) and sector size (CONF_SECTOR_SIZE) \
45 | are located within the device flash size.
46 | #endif
47 | #endif
48 |
49 | // <<< end of configuration section >>>
50 |
51 | #endif // NV_STORAGE_CONFIG_H
52 |
--------------------------------------------------------------------------------
/watch-library/shared/driver/thermistor_driver.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #ifndef THERMISTOR_DRIVER_H_
26 | #define THERMISTOR_DRIVER_H_
27 |
28 | // TODO: Do these belong in movement_config.h? In settings we can set on the watch? In an EEPROM configuration area?
29 | // Think on this. [joey 11/22]
30 | #define THERMISTOR_SENSE_PIN (A2)
31 | #define THERMISTOR_ENABLE_PIN (A0)
32 | #define THERMISTOR_ENABLE_VALUE (false)
33 | #define THERMISTOR_HIGH_SIDE (true)
34 | #define THERMISTOR_B_COEFFICIENT (3380.0)
35 | #define THERMISTOR_NOMINAL_TEMPERATURE (25.0)
36 | #define THERMISTOR_NOMINAL_RESISTANCE (10000.0)
37 | #define THERMISTOR_SERIES_RESISTANCE (10000.0)
38 |
39 | void thermistor_driver_enable(void);
40 | void thermistor_driver_disable(void);
41 | float thermistor_driver_get_temperature(void);
42 |
43 | #endif // THERMISTOR_DRIVER_H_
44 |
--------------------------------------------------------------------------------
/watch-library/shared/watch/watch_private_buzzer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2023 Wesley Aptekar-Cassels
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 | #ifndef _WATCH_PRIVATE_BUZZER_H_INCLUDED
25 | #define _WATCH_PRIVATE_BUZZER_H_INCLUDED
26 |
27 | // note: the buzzer uses a 1 MHz clock. these values were determined by dividing 1,000,000 by the target frequency.
28 | // i.e. for a 440 Hz tone (A4 on the piano), 1MHz/440Hz = 2273
29 | const uint16_t NotePeriods[108] = {18182,17161,16197,15288,14430,13620,12857,12134,11453,10811,10204,9631,9091,8581,8099,7645,7216,6811,6428,6068,5727,5405,5102,4816,4545,4290,4050,3822,3608,3405,3214,3034,2863,2703,2551,2408,2273,2145,2025,1911,1804,1703,1607,1517,1432,1351,1276,1204,1136,1073,1012,956,902,851,804,758,716,676,638,602,568,536,506,478,451,426,402,379,358,338,319,301,284,268,253,239,225,213,201,190,179,169,159,150,142,134,127};
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/watch-library/simulator/watch/watch.c:
--------------------------------------------------------------------------------
1 | #include "watch.h"
2 |
3 | bool watch_is_buzzer_or_led_enabled(void) {
4 | return false;
5 | }
6 |
7 | bool watch_is_usb_enabled(void) {
8 | return true;
9 | }
10 |
11 | void watch_reset_to_bootloader(void) {
12 | // No bootloader in the simulator; nothing to do here
13 | }
14 |
--------------------------------------------------------------------------------
/watch-library/simulator/watch/watch_adc.c:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2020 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #include "watch_adc.h"
26 |
27 | void watch_enable_adc(void) {}
28 |
29 | void watch_enable_analog_input(const uint8_t pin) {}
30 |
31 | uint16_t watch_get_analog_pin_level(const uint8_t pin) {
32 | return 32767; // pretend it's half of VCC
33 | }
34 |
35 | void watch_set_analog_num_samples(uint16_t samples) {}
36 |
37 | void watch_set_analog_sampling_length(uint8_t cycles) {}
38 |
39 | void watch_set_analog_reference_voltage(watch_adc_reference_voltage reference) {}
40 |
41 | uint16_t watch_get_vcc_voltage(void) {
42 | // TODO: (a2) hook to UI
43 | return 3000;
44 | }
45 |
46 | inline void watch_disable_analog_input(const uint8_t pin) {}
47 |
48 | inline void watch_disable_adc(void) {}
49 |
--------------------------------------------------------------------------------
/watch-library/simulator/watch/watch_gpio.c:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2020 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #include "watch_gpio.h"
26 |
27 | static bool pin_levels[UINT8_MAX];
28 |
29 | void watch_enable_digital_input(const uint8_t pin) {}
30 |
31 | void watch_disable_digital_input(const uint8_t pin) {}
32 |
33 | void watch_enable_pull_up(const uint8_t pin) {}
34 |
35 | void watch_enable_pull_down(const uint8_t pin) {}
36 |
37 | bool watch_get_pin_level(const uint8_t pin) {
38 | return pin_levels[pin];
39 | }
40 |
41 | void watch_enable_digital_output(const uint8_t pin) {}
42 |
43 | void watch_disable_digital_output(const uint8_t pin) {}
44 |
45 | void watch_set_pin_level(const uint8_t pin, const bool level) {
46 | pin_levels[pin] = level;
47 | }
48 |
--------------------------------------------------------------------------------
/watch-library/simulator/watch/watch_i2c.c:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2020 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #include "watch_i2c.h"
26 |
27 | void watch_enable_i2c(void) {}
28 |
29 | void watch_disable_i2c(void) {}
30 |
31 | void watch_i2c_send(int16_t addr, uint8_t *buf, uint16_t length) {}
32 |
33 | void watch_i2c_receive(int16_t addr, uint8_t *buf, uint16_t length) {}
34 |
35 | void watch_i2c_write8(int16_t addr, uint8_t reg, uint8_t data) {}
36 |
37 | uint8_t watch_i2c_read8(int16_t addr, uint8_t reg) {
38 | return 0;
39 | }
40 |
41 | uint16_t watch_i2c_read16(int16_t addr, uint8_t reg) {
42 | return 0;
43 | }
44 |
45 | uint32_t watch_i2c_read24(int16_t addr, uint8_t reg) {
46 | return 0;
47 | }
48 |
49 | uint32_t watch_i2c_read32(int16_t addr, uint8_t reg) {
50 | return 0;
51 | }
52 |
--------------------------------------------------------------------------------
/watch-library/simulator/watch/watch_main_loop.h:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #include "driver_init.h"
26 |
27 | void suspend_main_loop(void);
28 |
29 | void resume_main_loop(void);
30 |
31 | void main_loop_sleep(uint32_t ms);
32 |
33 | bool main_loop_is_sleeping(void);
34 |
35 | void delay_ms(const uint16_t ms);
36 |
--------------------------------------------------------------------------------
/watch-library/simulator/watch/watch_spi.c:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2022 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #include "watch_spi.h"
26 |
27 | void watch_enable_spi(void) {}
28 |
29 | void watch_disable_spi(void) {}
30 |
31 | bool watch_spi_write(const uint8_t *buf, uint16_t length) { return false; }
32 |
33 | bool watch_spi_read(uint8_t *buf, uint16_t length) { return false; }
34 |
35 | bool watch_spi_transfer(const uint8_t *data_out, uint8_t *data_in, uint16_t length) { return false; }
36 |
--------------------------------------------------------------------------------
/watch-library/simulator/watch/watch_storage.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include "watch_storage.h"
5 |
6 | uint8_t storage[NVMCTRL_ROW_SIZE * NVMCTRL_RWWEE_PAGES];
7 |
8 | bool watch_storage_read(uint32_t row, uint32_t offset, uint8_t *buffer, uint32_t size) {
9 | // printf("read row %ld offset %ld size %ld\n", row, offset, size);
10 | memcpy(buffer, storage + row * NVMCTRL_ROW_SIZE + offset, size);
11 |
12 | return true;
13 | }
14 |
15 | bool watch_storage_write(uint32_t row, uint32_t offset, const uint8_t *buffer, uint32_t size) {
16 | // printf("write row %ld offset %ld size %ld\n", row, offset, size);
17 | memcpy(storage + row * NVMCTRL_ROW_SIZE + offset, buffer, size);
18 |
19 | return true;
20 | }
21 |
22 | bool watch_storage_erase(uint32_t row) {
23 | // printf("erase row %ld\n", row);
24 | memset(storage + row * NVMCTRL_ROW_SIZE, 0xff, NVMCTRL_ROW_SIZE);
25 |
26 | return true;
27 | }
28 |
29 | bool watch_storage_sync(void) {
30 | // nothing to do here!
31 | return true;
32 | }
33 |
--------------------------------------------------------------------------------
/watch-library/simulator/watch/watch_uart.c:
--------------------------------------------------------------------------------
1 | /*
2 | * MIT License
3 | *
4 | * Copyright (c) 2020 Joey Castillo
5 | *
6 | * Permission is hereby granted, free of charge, to any person obtaining a copy
7 | * of this software and associated documentation files (the "Software"), to deal
8 | * in the Software without restriction, including without limitation the rights
9 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | * copies of the Software, and to permit persons to whom the Software is
11 | * furnished to do so, subject to the following conditions:
12 | *
13 | * The above copyright notice and this permission notice shall be included in all
14 | * copies or substantial portions of the Software.
15 | *
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | * SOFTWARE.
23 | */
24 |
25 | #include "watch_uart.h"
26 | #include "peripheral_clk_config.h"
27 |
28 | static bool tx_enable = false;
29 | static bool rx_enable = false;
30 |
31 | void watch_enable_uart(const uint8_t tx_pin, const uint8_t rx_pin, uint32_t baud) {
32 | tx_enable = !!tx_pin;
33 | rx_enable = !!rx_pin;
34 | }
35 |
36 | void watch_uart_puts(char *s) {
37 | if (tx_enable) {
38 | // TODO: hook up to UI
39 | }
40 | }
41 |
42 | char watch_uart_getc(void) {
43 | if (rx_enable) {
44 | // TODO: hook up to UI
45 | }
46 | return 0;
47 | }
48 |
--------------------------------------------------------------------------------