├── .github
└── workflows
│ ├── build.yml
│ └── pages.yml
├── .gitignore
├── LICENSE
├── README.md
├── cutcutgo.X
├── Makefile
├── cdc_com_port_single_pic32mx470_curiosity.mc3
├── nbproject
│ ├── Makefile-cutcutgo.mk
│ ├── Makefile-cutcutgo_bl.mk
│ ├── Makefile-genesis.properties
│ ├── Makefile-impl.mk
│ ├── Makefile-local-cutcutgo.mk
│ ├── Makefile-local-cutcutgo_bl.mk
│ ├── Makefile-variables.mk
│ ├── configurations.xml
│ ├── private
│ │ ├── configurations.xml
│ │ └── private.xml
│ └── project.xml
└── src
│ ├── app.c
│ ├── app.h
│ ├── config
│ └── cutcutgo
│ │ ├── bsp
│ │ ├── bsp.c
│ │ └── bsp.h
│ │ ├── configuration.h
│ │ ├── definitions.h
│ │ ├── device.h
│ │ ├── driver
│ │ ├── driver.h
│ │ ├── driver_common.h
│ │ └── usb
│ │ │ ├── drv_usb.h
│ │ │ ├── drv_usb_external_dependencies.h
│ │ │ └── usbfs
│ │ │ ├── drv_usbfs.h
│ │ │ └── src
│ │ │ ├── drv_usbfs.c
│ │ │ ├── drv_usbfs_device.c
│ │ │ ├── drv_usbfs_local.h
│ │ │ ├── drv_usbfs_variant_mapping.h
│ │ │ ├── plib_usbfs.h
│ │ │ ├── plib_usbfs_header.h
│ │ │ ├── templates
│ │ │ ├── usb_ALL_Interrupt_Default.h
│ │ │ ├── usb_ALL_Interrupt_Unsupported.h
│ │ │ ├── usb_ActivityPending_Default.h
│ │ │ ├── usb_ActivityPending_Unsupported.h
│ │ │ ├── usb_AutomaticSuspend_Default.h
│ │ │ ├── usb_AutomaticSuspend_Unsupported.h
│ │ │ ├── usb_BDTBaseAddress_Default.h
│ │ │ ├── usb_BDTBaseAddress_Unsupported.h
│ │ │ ├── usb_BDTFunctions_PIC32.h
│ │ │ ├── usb_BDTFunctions_Unsupported.h
│ │ │ ├── usb_BufferFreeze_Default.h
│ │ │ ├── usb_BufferFreeze_Unsupported.h
│ │ │ ├── usb_DeviceAddress_Default.h
│ │ │ ├── usb_DeviceAddress_Unsupported.h
│ │ │ ├── usb_EP0LowSpeedConnect_Default.h
│ │ │ ├── usb_EP0LowSpeedConnect_Unsupported.h
│ │ │ ├── usb_EP0NAKRetry_Default.h
│ │ │ ├── usb_EP0NAKRetry_Unsupported.h
│ │ │ ├── usb_EPnControlTransfer_Default.h
│ │ │ ├── usb_EPnControlTransfer_Unsupported.h
│ │ │ ├── usb_EPnHandshake_Default.h
│ │ │ ├── usb_EPnHandshake_Unsupported.h
│ │ │ ├── usb_EPnRxEnableEnhanced_PIC32.h
│ │ │ ├── usb_EPnRxEnableEnhanced_Unsupported.h
│ │ │ ├── usb_EPnStall_Default.h
│ │ │ ├── usb_EPnStall_Unsupported.h
│ │ │ ├── usb_EPnTxRx_Default.h
│ │ │ ├── usb_EPnTxRx_Unsupported.h
│ │ │ ├── usb_ERR_InterruptStatus_Default.h
│ │ │ ├── usb_ERR_InterruptStatus_Unsupported.h
│ │ │ ├── usb_ERR_Interrupt_Default.h
│ │ │ ├── usb_ERR_Interrupt_Unsupported.h
│ │ │ ├── usb_EyePattern_Default.h
│ │ │ ├── usb_EyePattern_Unsupported.h
│ │ │ ├── usb_FrameNumber_Default.h
│ │ │ ├── usb_FrameNumber_Unsupported.h
│ │ │ ├── usb_GEN_InterruptStatus_Default.h
│ │ │ ├── usb_GEN_InterruptStatus_Unsupported.h
│ │ │ ├── usb_GEN_Interrupt_Default.h
│ │ │ ├── usb_GEN_Interrupt_Unsupported.h
│ │ │ ├── usb_HostBusyWithToken_Default.h
│ │ │ ├── usb_HostBusyWithToken_Unsupported.h
│ │ │ ├── usb_HostGeneratesReset_Default.h
│ │ │ ├── usb_HostGeneratesReset_Unsupported.h
│ │ │ ├── usb_LastDirection_Default.h
│ │ │ ├── usb_LastDirection_Unsupported.h
│ │ │ ├── usb_LastEndpoint_Default.h
│ │ │ ├── usb_LastEndpoint_Unsupported.h
│ │ │ ├── usb_LastPingPong_Default.h
│ │ │ ├── usb_LastPingPong_Unsupported.h
│ │ │ ├── usb_LastTransactionDetails_Default.h
│ │ │ ├── usb_LastTransactionDetails_Unsupported.h
│ │ │ ├── usb_LiveJState_Default.h
│ │ │ ├── usb_LiveJState_Unsupported.h
│ │ │ ├── usb_LiveSingleEndedZero_Default.h
│ │ │ ├── usb_LiveSingleEndedZero_Unsupported.h
│ │ │ ├── usb_ModuleBusy_Default.h
│ │ │ ├── usb_ModuleBusy_Unsupported.h
│ │ │ ├── usb_ModulePower_32Bit16Bit.h
│ │ │ ├── usb_ModulePower_Unsupported.h
│ │ │ ├── usb_NextTokenSpeed_Default.h
│ │ │ ├── usb_NextTokenSpeed_Unsupported.h
│ │ │ ├── usb_OTG_ASessionValid_Default.h
│ │ │ ├── usb_OTG_ASessionValid_Unsupported.h
│ │ │ ├── usb_OTG_BSessionEnd_Default.h
│ │ │ ├── usb_OTG_BSessionEnd_Unsupported.h
│ │ │ ├── usb_OTG_IDPinState_Default.h
│ │ │ ├── usb_OTG_IDPinState_Unsupported.h
│ │ │ ├── usb_OTG_InterruptStatus_Default.h
│ │ │ ├── usb_OTG_InterruptStatus_Unsupported.h
│ │ │ ├── usb_OTG_Interrupt_Default.h
│ │ │ ├── usb_OTG_Interrupt_Unsupported.h
│ │ │ ├── usb_OTG_LineState_Default.h
│ │ │ ├── usb_OTG_LineState_Unsupported.h
│ │ │ ├── usb_OTG_PullUpPullDown_Default.h
│ │ │ ├── usb_OTG_PullUpPullDown_Unsupported.h
│ │ │ ├── usb_OTG_SessionValid_Default.h
│ │ │ ├── usb_OTG_SessionValid_Unsupported.h
│ │ │ ├── usb_OTG_VbusCharge_Default.h
│ │ │ ├── usb_OTG_VbusCharge_Unsupported.h
│ │ │ ├── usb_OTG_VbusDischarge_Default.h
│ │ │ ├── usb_OTG_VbusDischarge_Unsupported.h
│ │ │ ├── usb_OTG_VbusPowerOnOff_Default.h
│ │ │ ├── usb_OTG_VbusPowerOnOff_Unsupported.h
│ │ │ ├── usb_OnChipPullup_Unsupported.h
│ │ │ ├── usb_OnChipTransceiver_Unsupported.h
│ │ │ ├── usb_OpModeSelect_Default.h
│ │ │ ├── usb_OpModeSelect_Unsupported.h
│ │ │ ├── usb_PacketTransfer_Default.h
│ │ │ ├── usb_PacketTransfer_Unsupported.h
│ │ │ ├── usb_PingPongMode_Unsupported.h
│ │ │ ├── usb_ResumeSignaling_Default.h
│ │ │ ├── usb_ResumeSignaling_Unsupported.h
│ │ │ ├── usb_SOFThreshold_Default.h
│ │ │ ├── usb_SOFThreshold_Unsupported.h
│ │ │ ├── usb_SleepEntryGuard_Default.h
│ │ │ ├── usb_SleepEntryGuard_Unsupported.h
│ │ │ ├── usb_SpeedControl_Unsupported.h
│ │ │ ├── usb_StartOfFrames_Default.h
│ │ │ ├── usb_StartOfFrames_Unsupported.h
│ │ │ ├── usb_StopInIdle_Default.h
│ │ │ ├── usb_StopInIdle_Unsupported.h
│ │ │ ├── usb_Suspend_Default.h
│ │ │ ├── usb_Suspend_Unsupported.h
│ │ │ ├── usb_TokenEP_Default.h
│ │ │ ├── usb_TokenEP_Unsupported.h
│ │ │ ├── usb_TokenPID_Default.h
│ │ │ ├── usb_TokenPID_Unsupported.h
│ │ │ ├── usb_UOEMonitor_Unsupported.h
│ │ │ └── usbfs_registers.h
│ │ │ └── usbfs_registers.h
│ │ ├── exceptions.c
│ │ ├── harmony-manifest-success.yml
│ │ ├── harmony.prj.backup
│ │ ├── initialization.c
│ │ ├── interrupts.c
│ │ ├── interrupts.h
│ │ ├── osal
│ │ ├── osal.h
│ │ ├── osal_definitions.h
│ │ └── osal_impl_basic.h
│ │ ├── p32MX470F512H.bl.ld
│ │ ├── p32MX470F512H.ld
│ │ ├── peripheral
│ │ ├── clk
│ │ │ ├── plib_clk.c
│ │ │ └── plib_clk.h
│ │ ├── evic
│ │ │ ├── plib_evic.c
│ │ │ └── plib_evic.h
│ │ └── gpio
│ │ │ ├── plib_gpio.c
│ │ │ └── plib_gpio.h
│ │ ├── pic32mx470_curiosity.mhc
│ │ ├── BSP_PIC32MX470_Curiosity_Development_Board.yml
│ │ ├── GraphSettings.yml
│ │ ├── HarmonyCore.yml
│ │ ├── core.yml
│ │ ├── dfp.yml
│ │ ├── drv_usbfs_v1.yml
│ │ ├── mcc.txt
│ │ ├── project.yml
│ │ ├── settings.yml
│ │ ├── usb_device.yml
│ │ └── usb_device_cdc.yml
│ │ ├── pic32mx470_curiosity.xml.backup
│ │ ├── stdio
│ │ └── xc32_monitor.c
│ │ ├── system
│ │ ├── debug
│ │ │ └── sys_debug.h
│ │ ├── int
│ │ │ ├── src
│ │ │ │ └── sys_int.c
│ │ │ ├── sys_int.h
│ │ │ └── sys_int_mapping.h
│ │ ├── system.h
│ │ ├── system_common.h
│ │ └── system_module.h
│ │ ├── tasks.c
│ │ ├── toolchain_specifics.h
│ │ ├── usb
│ │ ├── src
│ │ │ ├── usb_device.c
│ │ │ ├── usb_device_cdc.c
│ │ │ ├── usb_device_cdc_acm.c
│ │ │ ├── usb_device_cdc_local.h
│ │ │ ├── usb_device_function_driver.h
│ │ │ ├── usb_device_local.h
│ │ │ ├── usb_device_mapping.h
│ │ │ └── usb_external_dependencies.h
│ │ ├── usb_cdc.h
│ │ ├── usb_chapter_9.h
│ │ ├── usb_common.h
│ │ ├── usb_device.h
│ │ ├── usb_device_cdc.h
│ │ ├── usb_host.h
│ │ ├── usb_host_client_driver.h
│ │ ├── usb_host_hub_interface.h
│ │ └── usb_hub.h
│ │ ├── usb_device_init_data.c
│ │ └── user.h
│ ├── grbl
│ ├── .gitignore
│ ├── COPYING
│ ├── Makefile
│ ├── doc
│ │ ├── csv
│ │ │ ├── alarm_codes_en_US.csv
│ │ │ ├── build_option_codes_en_US.csv
│ │ │ ├── error_codes_en_US.csv
│ │ │ └── setting_codes_en_US.csv
│ │ ├── log
│ │ │ ├── commit_log_v0.7.txt
│ │ │ ├── commit_log_v0.8c.txt
│ │ │ ├── commit_log_v0.9g.txt
│ │ │ ├── commit_log_v0.9i.txt
│ │ │ ├── commit_log_v0.9j.txt
│ │ │ ├── commit_log_v1.0b.txt
│ │ │ ├── commit_log_v1.0c.txt
│ │ │ └── commit_log_v1.1.txt
│ │ ├── markdown
│ │ │ ├── change_summary.md
│ │ │ ├── commands.md
│ │ │ ├── interface.md
│ │ │ ├── jogging.md
│ │ │ ├── laser_mode.md
│ │ │ └── settings.md
│ │ └── script
│ │ │ ├── fit_nonlinear_spindle.py
│ │ │ ├── simple_stream.py
│ │ │ └── stream.py
│ └── grbl
│ │ ├── config.h
│ │ ├── coolant_control.c
│ │ ├── coolant_control.h
│ │ ├── cpu_map.h
│ │ ├── defaults.h
│ │ ├── eeprom.c
│ │ ├── eeprom.h
│ │ ├── examples
│ │ ├── grblUpload
│ │ │ ├── grblUpload.ino
│ │ │ └── license.txt
│ │ └── grblWrite_BuildInfo
│ │ │ ├── grblWrite_BuildInfo.ino
│ │ │ └── license.txt
│ │ ├── gcode.c
│ │ ├── gcode.h
│ │ ├── grbl.h
│ │ ├── jog.c
│ │ ├── jog.h
│ │ ├── limits.c
│ │ ├── limits.h
│ │ ├── main.c
│ │ ├── motion_control.c
│ │ ├── motion_control.h
│ │ ├── nuts_bolts.c
│ │ ├── nuts_bolts.h
│ │ ├── planner.c
│ │ ├── planner.h
│ │ ├── print.c
│ │ ├── print.h
│ │ ├── probe.c
│ │ ├── probe.h
│ │ ├── protocol.c
│ │ ├── protocol.h
│ │ ├── report.c
│ │ ├── report.h
│ │ ├── serial.c
│ │ ├── serial.h
│ │ ├── settings.c
│ │ ├── settings.h
│ │ ├── spindle_control.c
│ │ ├── spindle_control.h
│ │ ├── stepper.c
│ │ ├── stepper.h
│ │ ├── system.c
│ │ └── system.h
│ ├── hal
│ ├── button.c
│ ├── button.h
│ ├── config.h
│ ├── led.c
│ ├── led.h
│ ├── motor.c
│ ├── motor.h
│ ├── timer.c
│ ├── timer.h
│ ├── watchdog.c
│ └── watchdog.h
│ ├── main.c
│ ├── packs
│ ├── PIC32MK1024GPE100_DFP
│ │ └── device.h
│ └── PIC32MX470F512H_DFP
│ │ └── device.h
│ ├── reset.c
│ └── reset.h
├── docs
├── .nojekyll
├── Makefile
├── requirements.txt
└── source
│ ├── _static
│ ├── documents
│ │ ├── CricutMaker-schematics.pdf
│ │ ├── RN4678.pdf
│ │ ├── microchip-pic32mx470F512L.pdf
│ │ ├── pic32mx470-RM.pdf
│ │ ├── reverse-pcb-release.svg.zip
│ │ └── teardown
│ │ │ └── microchip-pic32mx470F512L.pdf
│ └── images
│ │ ├── bootloader
│ │ ├── app-running.png
│ │ ├── buttons-msd-on.png
│ │ ├── buttons-off.png
│ │ ├── msd-device.png
│ │ └── msd-programming.png
│ │ ├── pcb
│ │ ├── ATH-84-100-X12.jpg
│ │ ├── ATH-84-112-X3.jpg
│ │ ├── ATH-84-113-X1.jpg
│ │ └── SCM-84-100-X7.jpg
│ │ ├── setup
│ │ ├── connect-snap.png
│ │ ├── cutting-hole.jpg
│ │ ├── debug-connector.jpg
│ │ ├── debug-pcb-installed.jpg
│ │ ├── inkcut-device-connection-cmds.png
│ │ ├── inkcut-device-connection.png
│ │ ├── inkcut-device-output.png
│ │ ├── inkcut-device-protocol.png
│ │ ├── inkcut-device-setup.png
│ │ ├── microchip-snap.jpg
│ │ ├── mplab-ipe-first-step.png
│ │ ├── mplab-ipe-fourth-step.png
│ │ ├── mplab-ipe-second-step.png
│ │ ├── mplab-ipe-third-step.png
│ │ ├── mplabx_build_flash.png
│ │ ├── plot-margin.png
│ │ ├── screenshot_doc_properties.png
│ │ └── screenshot_of_send_to_cricut.png
│ │ └── teardown
│ │ ├── X-axis-reduction-gears.jpg
│ │ ├── Y-axis-reduction-gears.jpg
│ │ ├── pcb-breakout.png
│ │ ├── servo-motor.webp
│ │ └── x-axis-mechanical.jpg
│ ├── conf.py
│ ├── config.rst
│ ├── index.rst
│ ├── inkscape.rst
│ ├── intro.rst
│ ├── setup.rst
│ ├── teardown.rst
│ └── tech.rst
├── schematics
└── CricutMaker-schematics.pdf
└── utils
├── cutcutgo_mkuf2.sh
├── uf2conv.py
└── uf2families.json
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: "Pre-release"
2 |
3 | on:
4 | push:
5 | branches:
6 | - "main"
7 | paths:
8 | - "cutcutgo.X/**"
9 | - ".github/workflows/build.yml"
10 |
11 | jobs:
12 | pre-release:
13 | name: "Pre-release"
14 | runs-on: ubuntu-latest
15 |
16 | env:
17 | PROJECT_DIR: cutcutgo.X
18 | TMP_DIR: tmp
19 | RELEASE_DIR: release
20 | APP_STANDALONE_NAME: Cutcutgo_maker1_standalone_app.hex
21 | APP_UF2_NAME: Cutcutgo_maker1_bootloader_app.uf2
22 |
23 | steps:
24 | - id: step1
25 | name: Checkout sources
26 | uses: actions/checkout@v4
27 |
28 | - id: step2
29 | name: Create temporary directory
30 | run: mkdir $TMP_DIR
31 |
32 | - id: step3
33 | name: Create release directory
34 | run: mkdir $RELEASE_DIR
35 |
36 | - id: step4
37 | name: Build firmware
38 | uses: Rockman18/ghactions-mplabx@master
39 | with:
40 | project: ${{ env.PROJECT_DIR }}
41 | configuration: cutcutgo,cutcutgo_bl
42 |
43 | - id: step5
44 | name: Move standalone firmware
45 | run: cp $PROJECT_DIR/dist/cutcutgo/production/cutcutgo.X.production.hex $RELEASE_DIR/$APP_STANDALONE_NAME
46 |
47 | - id: step6
48 | name: Convert bootloader app hex to bin
49 | run: objcopy -Iihex -Obinary $PROJECT_DIR/dist/cutcutgo_bl/production/cutcutgo.X.production.hex $TMP_DIR/cutcutgo-app.bin
50 |
51 | - id: step7
52 | name: Convert bootloader app bin to UF2
53 | run: ./utils/uf2conv.py -c -f 0x4d414b52 -b 0x1d010000 -o $RELEASE_DIR/$APP_UF2_NAME $TMP_DIR/cutcutgo-app.bin
54 |
55 | - id: step8
56 | name: Create pre-release
57 | uses: "marvinpinto/action-automatic-releases@latest"
58 | with:
59 | repo_token: "${{ github.token }}"
60 | automatic_release_tag: "latest"
61 | prerelease: true
62 | title: "Development Build"
63 | files: ${{ env.RELEASE_DIR }}/**
64 |
--------------------------------------------------------------------------------
/.github/workflows/pages.yml:
--------------------------------------------------------------------------------
1 | name: sphinx
2 | on:
3 | push:
4 | paths:
5 | - 'docs/**'
6 |
7 | permissions:
8 | contents: write
9 |
10 | env:
11 | DEFAULT_BRANCH: "main"
12 |
13 | jobs:
14 |
15 | build-and-deploy:
16 | name: Build and deploy to Github pages
17 | runs-on: ubuntu-latest
18 | steps:
19 |
20 | - name: Checkout
21 | uses: actions/checkout@v4
22 |
23 | - name: Install Python
24 | uses: actions/setup-python@v4
25 | with:
26 | python-version: '3.10'
27 | cache: 'pip'
28 |
29 | - name: Install dependencies
30 | run: pip install -r ./docs/requirements.txt
31 |
32 | - name: Build sphinx docs
33 | run: sphinx-build ./docs/source ./docs/build/html
34 |
35 | - name: Deploy
36 | uses: peaceiris/actions-gh-pages@v3
37 | with:
38 | github_token: ${{ secrets.GITHUB_TOKEN }}
39 | publish_dir: ./docs/build/html/
40 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | build/
2 | debug/
3 | dist/
4 | .vscode/
5 | .generated_files/
6 |
7 | # Prerequisites
8 | *.d
9 |
10 | # Object files
11 | *.o
12 | *.ko
13 | *.obj
14 | *.elf
15 |
16 | # Linker output
17 | *.ilk
18 | *.map
19 | *.exp
20 |
21 | # Precompiled Headers
22 | *.gch
23 | *.pch
24 |
25 | # Libraries
26 | *.lib
27 | *.a
28 | *.la
29 | *.lo
30 |
31 | # Shared objects (inc. Windows DLLs)
32 | *.dll
33 | *.so
34 | *.so.*
35 | *.dylib
36 |
37 | # Executables
38 | *.exe
39 | *.out
40 | *.app
41 | *.i*86
42 | *.x86_64
43 | *.hex
44 |
45 | # Debug files
46 | *.dSYM/
47 | *.su
48 | *.idb
49 | *.pdb
50 |
51 | # Kernel Module Compile Results
52 | *.mod*
53 | *.cmd
54 | .tmp_versions/
55 | modules.order
56 | Module.symvers
57 | Mkfile.old
58 | dkms.conf
59 |
60 | ### MPLabX ###
61 | #Ignore List for Microchip's MPLAB X IDE
62 | #It's a form of NetBeans with vendor specific changes
63 | #Taken from zeha on GIST https://gist.github.com/zeha/5999375
64 | #Updated by Cristian Cristea (https://github.com/cristiancristea00)
65 |
66 | *.d
67 | *.pre
68 | *.p1
69 | *.lst
70 | *.sym
71 | *.obj
72 | *.o
73 | *.sdb
74 | *.obj.dmp
75 | *.mk
76 | *.map
77 | *.properties
78 | *.production
79 | *.debug
80 | cutcutgo.X/html/
81 | cutcutgo.X/nbproject/private/
82 | cutcutgo.X/nbproject/Package-*.bash
83 | cutcutgo.X/build/
84 | cutcutgo.X/debug/
85 | cutcutgo.X/nbbuild/
86 | cutcutgo.X/dist/
87 | cutcutgo.X/nbdist/
88 | cutcutgo.X/nbactions.xml
89 | cutcutgo.X/nb-configuration.xml
90 | cutcutgo.X/funclist
91 | cutcutgo.X/nbproject/Makefile-*
92 | cutcutgo.X/disassembly/
93 | #cutcutgo.X/.generated_files/
94 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Damien Cauquil
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 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CutCutGo: GRBL for Cricut Maker
2 |
3 | MPLABX project for a custom Cricut Maker compatible firmware.
4 |
5 | ## Download Firmware
6 | The latest pre-compiled firmwares (standalone and bootloader versions) are available on this [Release page](https://github.com/virtualabs/cutcutgo/releases/tag/latest)
7 |
8 | ## Documentation
9 | The documentation is available on [GitHub Pages](https://virtualabs.github.io/cutcutgo/)
10 |
11 | Don't hesitate to contribute !!!
12 |
--------------------------------------------------------------------------------
/cutcutgo.X/nbproject/Makefile-genesis.properties:
--------------------------------------------------------------------------------
1 | #
2 | #Thu Jan 18 20:53:48 CET 2024
3 | cutcutgo_bl.Pack.dfplocation=/home/virtualabs/opt/mplab/v6.05/packs/Microchip/PIC32MX_DFP/1.5.259
4 | cutcutgo_bl.languagetoolchain.version=4.20
5 | conf.ids=cutcutgo,cutcutgo_bl
6 | cutcutgo.languagetoolchain.version=4.20
7 | host.id=1nfb-nkpv-ui
8 | cutcutgo.com-microchip-mplab-mdbcore-snap-SnapToolImpl.md5=b82249af6ca6a1d885406dfe6709ee20
9 | configurations-xml=a6cfb8386f32d2a6f0888b94385a9473
10 | cutcutgo_bl.languagetoolchain.dir=/home/virtualabs/opt/microchip/xc32/v4.20/bin
11 | cutcutgo.Pack.dfplocation=/home/virtualabs/opt/mplab/v6.05/packs/Microchip/PIC32MX_DFP/1.5.259
12 | cutcutgo.languagetoolchain.dir=/home/virtualabs/opt/microchip/xc32/v4.20/bin
13 | cutcutgo_bl.com-microchip-mplab-mdbcore-snap-SnapToolImpl.md5=b82249af6ca6a1d885406dfe6709ee20
14 | com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=5ac7a99e4b1de1ea64248c04a43532ad
15 | proj.dir=/home/virtualabs/projets/CutcutGo/cutcutgo.X
16 | cutcutgo_bl.com-microchip-mplab-nbide-toolchain-xc32-XC32LanguageToolchain.md5=de2d3bc95a22a3f432c2e39f49efafbc
17 | host.platform=linux
18 | cutcutgo.com-microchip-mplab-nbide-toolchain-xc32-XC32LanguageToolchain.md5=de2d3bc95a22a3f432c2e39f49efafbc
19 |
--------------------------------------------------------------------------------
/cutcutgo.X/nbproject/Makefile-impl.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Generated Makefile - do not edit!
3 | #
4 | # Edit the Makefile in the project folder instead (../Makefile). Each target
5 | # has a pre- and a post- target defined where you can add customization code.
6 | #
7 | # This makefile implements macros and targets common to all configurations.
8 | #
9 | # NOCDDL
10 |
11 |
12 | # Building and Cleaning subprojects are done by default, but can be controlled with the SUB
13 | # macro. If SUB=no, subprojects will not be built or cleaned. The following macro
14 | # statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
15 | # and .clean-reqprojects-conf unless SUB has the value 'no'
16 | SUB_no=NO
17 | SUBPROJECTS=${SUB_${SUB}}
18 | BUILD_SUBPROJECTS_=.build-subprojects
19 | BUILD_SUBPROJECTS_NO=
20 | BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
21 | CLEAN_SUBPROJECTS_=.clean-subprojects
22 | CLEAN_SUBPROJECTS_NO=
23 | CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
24 |
25 |
26 | # Project Name
27 | PROJECTNAME=cutcutgo.X
28 |
29 | # Active Configuration
30 | DEFAULTCONF=cutcutgo
31 | CONF=${DEFAULTCONF}
32 |
33 | # All Configurations
34 | ALLCONFS=cutcutgo cutcutgo_bl
35 |
36 |
37 | # build
38 | .build-impl: .build-pre
39 | ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf
40 |
41 |
42 | # clean
43 | .clean-impl: .clean-pre
44 | ${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf
45 |
46 | # clobber
47 | .clobber-impl: .clobber-pre .depcheck-impl
48 | ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=cutcutgo clean
49 | ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=cutcutgo_bl clean
50 |
51 |
52 |
53 | # all
54 | .all-impl: .all-pre .depcheck-impl
55 | ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=cutcutgo build
56 | ${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=cutcutgo_bl build
57 |
58 |
59 |
60 | # dependency checking support
61 | .depcheck-impl:
62 | # @echo "# This code depends on make tool being used" >.dep.inc
63 | # @if [ -n "${MAKE_VERSION}" ]; then \
64 | # echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \
65 | # echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
66 | # echo "include \$${DEPFILES}" >>.dep.inc; \
67 | # echo "endif" >>.dep.inc; \
68 | # else \
69 | # echo ".KEEP_STATE:" >>.dep.inc; \
70 | # echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
71 | # fi
72 |
--------------------------------------------------------------------------------
/cutcutgo.X/nbproject/Makefile-local-cutcutgo.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Generated Makefile - do not edit!
3 | #
4 | #
5 | # This file contains information about the location of compilers and other tools.
6 | # If you commmit this file into your revision control server, you will be able to
7 | # to checkout the project and build it from the command line with make. However,
8 | # if more than one person works on the same project, then this file might show
9 | # conflicts since different users are bound to have compilers in different places.
10 | # In that case you might choose to not commit this file and let MPLAB X recreate this file
11 | # for each user. The disadvantage of not commiting this file is that you must run MPLAB X at
12 | # least once so the file gets created and the project can be built. Finally, you can also
13 | # avoid using this file at all if you are only building from the command line with make.
14 | # You can invoke make with the values of the macros:
15 | # $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
16 | #
17 | PATH_TO_IDE_BIN=/home/virtualabs/opt/mplab/v6.05/mplab_platform/platform/../mplab_ide/modules/../../bin/
18 | # Adding MPLAB X bin directory to path.
19 | PATH:=/home/virtualabs/opt/mplab/v6.05/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH)
20 | # Path to java used to run MPLAB X when this makefile was created
21 | MP_JAVA_PATH="/home/virtualabs/opt/mplab/v6.05/sys/java/zulu8.64.0.19-ca-fx-jre8.0.345-linux_x64/bin/"
22 | OS_CURRENT="$(shell uname -s)"
23 | MP_CC="/home/virtualabs/opt/microchip/xc32/v4.20/bin/xc32-gcc"
24 | MP_CPPC="/home/virtualabs/opt/microchip/xc32/v4.20/bin/xc32-g++"
25 | # MP_BC is not defined
26 | MP_AS="/home/virtualabs/opt/microchip/xc32/v4.20/bin/xc32-as"
27 | MP_LD="/home/virtualabs/opt/microchip/xc32/v4.20/bin/xc32-ld"
28 | MP_AR="/home/virtualabs/opt/microchip/xc32/v4.20/bin/xc32-ar"
29 | DEP_GEN=${MP_JAVA_PATH}java -jar "/home/virtualabs/opt/mplab/v6.05/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
30 | MP_CC_DIR="/home/virtualabs/opt/microchip/xc32/v4.20/bin"
31 | MP_CPPC_DIR="/home/virtualabs/opt/microchip/xc32/v4.20/bin"
32 | # MP_BC_DIR is not defined
33 | MP_AS_DIR="/home/virtualabs/opt/microchip/xc32/v4.20/bin"
34 | MP_LD_DIR="/home/virtualabs/opt/microchip/xc32/v4.20/bin"
35 | MP_AR_DIR="/home/virtualabs/opt/microchip/xc32/v4.20/bin"
36 | DFP_DIR=/home/virtualabs/opt/mplab/v6.05/packs/Microchip/PIC32MX_DFP/1.5.259
37 |
--------------------------------------------------------------------------------
/cutcutgo.X/nbproject/Makefile-local-cutcutgo_bl.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Generated Makefile - do not edit!
3 | #
4 | #
5 | # This file contains information about the location of compilers and other tools.
6 | # If you commmit this file into your revision control server, you will be able to
7 | # to checkout the project and build it from the command line with make. However,
8 | # if more than one person works on the same project, then this file might show
9 | # conflicts since different users are bound to have compilers in different places.
10 | # In that case you might choose to not commit this file and let MPLAB X recreate this file
11 | # for each user. The disadvantage of not commiting this file is that you must run MPLAB X at
12 | # least once so the file gets created and the project can be built. Finally, you can also
13 | # avoid using this file at all if you are only building from the command line with make.
14 | # You can invoke make with the values of the macros:
15 | # $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
16 | #
17 | PATH_TO_IDE_BIN=/home/virtualabs/opt/mplab/v6.05/mplab_platform/platform/../mplab_ide/modules/../../bin/
18 | # Adding MPLAB X bin directory to path.
19 | PATH:=/home/virtualabs/opt/mplab/v6.05/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH)
20 | # Path to java used to run MPLAB X when this makefile was created
21 | MP_JAVA_PATH="/home/virtualabs/opt/mplab/v6.05/sys/java/zulu8.64.0.19-ca-fx-jre8.0.345-linux_x64/bin/"
22 | OS_CURRENT="$(shell uname -s)"
23 | MP_CC="/home/virtualabs/opt/microchip/xc32/v4.20/bin/xc32-gcc"
24 | MP_CPPC="/home/virtualabs/opt/microchip/xc32/v4.20/bin/xc32-g++"
25 | # MP_BC is not defined
26 | MP_AS="/home/virtualabs/opt/microchip/xc32/v4.20/bin/xc32-as"
27 | MP_LD="/home/virtualabs/opt/microchip/xc32/v4.20/bin/xc32-ld"
28 | MP_AR="/home/virtualabs/opt/microchip/xc32/v4.20/bin/xc32-ar"
29 | DEP_GEN=${MP_JAVA_PATH}java -jar "/home/virtualabs/opt/mplab/v6.05/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
30 | MP_CC_DIR="/home/virtualabs/opt/microchip/xc32/v4.20/bin"
31 | MP_CPPC_DIR="/home/virtualabs/opt/microchip/xc32/v4.20/bin"
32 | # MP_BC_DIR is not defined
33 | MP_AS_DIR="/home/virtualabs/opt/microchip/xc32/v4.20/bin"
34 | MP_LD_DIR="/home/virtualabs/opt/microchip/xc32/v4.20/bin"
35 | MP_AR_DIR="/home/virtualabs/opt/microchip/xc32/v4.20/bin"
36 | DFP_DIR=/home/virtualabs/opt/mplab/v6.05/packs/Microchip/PIC32MX_DFP/1.5.259
37 |
--------------------------------------------------------------------------------
/cutcutgo.X/nbproject/Makefile-variables.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Generated - do not edit!
3 | #
4 | # NOCDDL
5 | #
6 | CND_BASEDIR=`pwd`
7 | # cutcutgo configuration
8 | CND_ARTIFACT_DIR_cutcutgo=dist/cutcutgo/production
9 | CND_ARTIFACT_NAME_cutcutgo=cutcutgo.X.production.hex
10 | CND_ARTIFACT_PATH_cutcutgo=dist/cutcutgo/production/cutcutgo.X.production.hex
11 | # cutcutgo_bl configuration
12 | CND_ARTIFACT_DIR_cutcutgo_bl=dist/cutcutgo_bl/production
13 | CND_ARTIFACT_NAME_cutcutgo_bl=cutcutgo.X.production.hex
14 | CND_ARTIFACT_PATH_cutcutgo_bl=dist/cutcutgo_bl/production/cutcutgo.X.production.hex
15 |
--------------------------------------------------------------------------------
/cutcutgo.X/nbproject/private/configurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Makefile
4 | 0
5 |
6 |
7 | :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>9018:=<rev>0100:=<man>Microchip Technology Incorporated:=<prod>MPLAB Snap ICD:=<sn>BUR205171011:=<drv>x:=<xpt>b:=end
8 | /home/virtualabs/opt/microchip/xc32/v4.20/bin
9 |
10 | place holder 1
11 | place holder 2
12 |
13 |
14 |
15 |
16 | true
17 | 0
18 | 0
19 | 0
20 |
21 |
22 |
23 |
24 |
25 | :=MPLABComm-USB-Microchip:=<vid>04D8:=<pid>9018:=<rev>0100:=<man>Microchip Technology Incorporated:=<prod>MPLAB Snap ICD:=<sn>BUR205171011:=<drv>x:=<xpt>b:=end
26 | /home/virtualabs/opt/microchip/xc32/v4.20/bin
27 |
28 | place holder 1
29 | place holder 2
30 |
31 |
32 |
33 |
34 | true
35 | 0
36 | 0
37 | 0
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/cutcutgo.X/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | com.microchip.mplab.nbide.embedded.makeproject
4 |
5 |
6 | CutcutGo
7 | e54023e9-3948-44ef-bf6f-29d8b223e555
8 | 0
9 | c
10 |
11 | h
12 |
13 | ISO-8859-1
14 |
15 |
16 | src
17 | ../../cutcutgo-bl/cutcutgo_bl.X/src
18 |
19 |
20 |
21 | cutcutgo
22 | 2
23 |
24 |
25 | cutcutgo_bl
26 | 2
27 |
28 |
29 |
30 | false
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/bsp/bsp.c:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | Board Support Package Implementation
3 |
4 | Company:
5 | Microchip Technology Inc.
6 |
7 | File Name:
8 | bsp.c
9 |
10 | Summary:
11 | Board Support Package implementation.
12 |
13 | Description:
14 | This file contains routines that implement the board support package
15 | *******************************************************************************/
16 |
17 | // DOM-IGNORE-BEGIN
18 | /*******************************************************************************
19 | * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
20 | *
21 | * Subject to your compliance with these terms, you may use Microchip software
22 | * and any derivatives exclusively with Microchip products. It is your
23 | * responsibility to comply with third party license terms applicable to your
24 | * use of third party software (including open source software) that may
25 | * accompany Microchip software.
26 | *
27 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
28 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
29 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
30 | * PARTICULAR PURPOSE.
31 | *
32 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
33 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
34 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
35 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
36 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
37 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
38 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
39 | *******************************************************************************/
40 | // DOM-IGNORE-END
41 |
42 | // *****************************************************************************
43 | // *****************************************************************************
44 | // Section: Included Files
45 | // *****************************************************************************
46 | // *****************************************************************************
47 |
48 | #include "bsp.h"
49 |
50 | // *****************************************************************************
51 | // *****************************************************************************
52 | // *****************************************************************************
53 | // Section: Interface Routines
54 | // *****************************************************************************
55 | // *****************************************************************************
56 |
57 | // *****************************************************************************
58 | /* Function:
59 | void BSP_Initialize(void)
60 |
61 | Summary:
62 | Performs the necessary actions to initialize a board
63 |
64 | Description:
65 | This function initializes the LED, Switch and other ports on the board.
66 | This function must be called by the user before using any APIs present in
67 | this BSP.
68 |
69 | Remarks:
70 | Refer to bsp.h for usage information.
71 | */
72 |
73 | void BSP_Initialize(void )
74 | {
75 |
76 |
77 | /* Switch off LEDs */
78 | LED2_Off();
79 | LED3_Off();
80 | RGB_LED_GREEN_Off();
81 | RGB_LED_BLUE_Off();
82 | RGB_LED_RED_Off();
83 | LED_Off();
84 |
85 |
86 | }
87 |
88 | /*******************************************************************************
89 | End of File
90 | */
91 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/device.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | Device Header File
3 |
4 | Company:
5 | Microchip Technology Inc.
6 |
7 | File Name:
8 | device.h
9 |
10 | Summary:
11 | This file includes the selected device from within the project.
12 | The device will provide access to respective device packs.
13 |
14 | Description:
15 | None
16 |
17 | *******************************************************************************/
18 |
19 | // DOM-IGNORE-BEGIN
20 | /*******************************************************************************
21 | * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
22 | *
23 | * Subject to your compliance with these terms, you may use Microchip software
24 | * and any derivatives exclusively with Microchip products. It is your
25 | * responsibility to comply with third party license terms applicable to your
26 | * use of third party software (including open source software) that may
27 | * accompany Microchip software.
28 | *
29 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
30 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
31 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
32 | * PARTICULAR PURPOSE.
33 | *
34 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
35 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
36 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
37 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
38 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
39 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
40 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
41 | *******************************************************************************/
42 | // DOM-IGNORE-END
43 |
44 | #ifndef DEVICE_H
45 | #define DEVICE_H
46 |
47 | #include
48 | #include
49 | #include "toolchain_specifics.h"
50 |
51 | #endif //DEVICE_H
52 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/driver.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | Driver Layer Interface Header
3 |
4 | Company:
5 | Microchip Technology Inc.
6 |
7 | File Name:
8 | driver.h
9 |
10 | Summary:
11 | Driver layer data types and definitions.
12 |
13 | Description:
14 | This file defines the common macros and definitions for the driver layer
15 | modules.
16 |
17 | Remarks:
18 | The parent directory to the "driver" directory should be added to the
19 | compiler's search path for header files such that the following include
20 | statement will successfully include this file.
21 |
22 | #include "driver/driver.h"
23 | *************************************************************************/
24 |
25 | //DOM-IGNORE-BEGIN
26 | /*******************************************************************************
27 | * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
28 | *
29 | * Subject to your compliance with these terms, you may use Microchip software
30 | * and any derivatives exclusively with Microchip products. It is your
31 | * responsibility to comply with third party license terms applicable to your
32 | * use of third party software (including open source software) that may
33 | * accompany Microchip software.
34 | *
35 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
36 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
37 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
38 | * PARTICULAR PURPOSE.
39 | *
40 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
41 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
42 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
43 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
44 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
45 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
46 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
47 | *******************************************************************************/
48 | //DOM-IGNORE-END
49 |
50 | #ifndef DRIVER_H
51 | #define DRIVER_H
52 |
53 |
54 | // *****************************************************************************
55 | // *****************************************************************************
56 | // Section: Included Files
57 | // *****************************************************************************
58 | // *****************************************************************************
59 |
60 | #include "driver/driver_common.h"
61 |
62 |
63 | #endif // DRIVER_H
64 | /*******************************************************************************
65 | End of File
66 | */
67 |
68 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/drv_usb_external_dependencies.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB stack external dependencies file
3 |
4 | Company:
5 | Microchip Technology Inc.
6 |
7 | File Name:
8 | drv_usb_external_dependencies.h
9 |
10 | Summary:
11 | USB Driver external dependencies file
12 |
13 | Description:
14 | USB Driver external dependencies file.
15 | *******************************************************************************/
16 |
17 | //DOM-IGNORE-BEGIN
18 | /*******************************************************************************
19 | * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
20 | *
21 | * Subject to your compliance with these terms, you may use Microchip software
22 | * and any derivatives exclusively with Microchip products. It is your
23 | * responsibility to comply with third party license terms applicable to your
24 | * use of third party software (including open source software) that may
25 | * accompany Microchip software.
26 | *
27 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
28 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
29 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
30 | * PARTICULAR PURPOSE.
31 | *
32 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
33 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
34 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
35 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
36 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
37 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
38 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
39 | *******************************************************************************/
40 | //DOM-IGNORE-END
41 |
42 | #ifndef _DRV_USB_EXTERNAL_DEPENDENCIES_H
43 | #define _DRV_USB_EXTERNAL_DEPENDENCIES_H
44 |
45 | #include
46 | #include "system/system_common.h"
47 | #include "configuration.h"
48 | #include "definitions.h"
49 | #include "system/system_module.h"
50 |
51 | #if !defined(SYS_DEBUG_ENABLE)
52 |
53 | #if !defined(SYS_DEBUG_PRINT)
54 | #define SYS_DEBUG_PRINT(level, format, ...)
55 | #endif
56 |
57 | #if !defined(SYS_DEBUG_MESSAGE)
58 | #define SYS_DEBUG_MESSAGE(a,b, ...)
59 | #endif
60 |
61 | #if !defined(SYS_DEBUG)
62 | #define SYS_DEBUG(a,b)
63 | #endif
64 | #endif
65 | #endif /* End of #ifndef _DRV_USB_EXTERNAL_DEPENDENCIES_H */
66 | /*******************************************************************************
67 | End of File
68 | */
69 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/plib_usbfs.h:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/plib_usbfs.h
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_ActivityPending_Default.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_ActivityPending_Default.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : ActivityPending
13 | and its Variant : Default
14 | For following APIs :
15 | PLIB_USB_ActivityPending
16 | PLIB_USB_ExistsActivityPending
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_ACTIVITYPENDING_DEFAULT_H
47 | #define _USB_ACTIVITYPENDING_DEFAULT_H
48 |
49 | #include "driver/usb/usbfs/src/templates/usbfs_registers.h"
50 | //******************************************************************************
51 | /* Function : USB_ActivityPending_Default
52 |
53 | Summary:
54 | Implements Default variant of PLIB_USB_ActivityPending
55 |
56 | Description:
57 | This template implements the Default variant of the PLIB_USB_ActivityPending function.
58 | */
59 |
60 | PLIB_TEMPLATE bool USB_ActivityPending_Default( USB_MODULE_ID index )
61 | {
62 | volatile usb_registers_t * usb = ((usb_registers_t *)(index));
63 | return usb->UxPWRC.UACTPND;
64 | }
65 |
66 | //******************************************************************************
67 | /* Function : USB_ExistsActivityPending_Default
68 |
69 | Summary:
70 | Implements Default variant of PLIB_USB_ExistsActivityPending
71 |
72 | Description:
73 | This template implements the Default variant of the PLIB_USB_ExistsActivityPending function.
74 | */
75 |
76 | #define PLIB_USB_ExistsActivityPending PLIB_USB_ExistsActivityPending
77 | PLIB_TEMPLATE bool USB_ExistsActivityPending_Default( USB_MODULE_ID index )
78 | {
79 | return true;
80 | }
81 |
82 |
83 | #endif /*_USB_ACTIVITYPENDING_DEFAULT_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_ActivityPending_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_ActivityPending_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : ActivityPending
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_ActivityPending
16 | PLIB_USB_ExistsActivityPending
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_ACTIVITYPENDING_UNSUPPORTED_H
47 | #define _USB_ACTIVITYPENDING_UNSUPPORTED_H
48 |
49 | #include "../templates/usb_registers.h"
50 |
51 | //******************************************************************************
52 | /* Function : USB_ActivityPending_Unsupported
53 |
54 | Summary:
55 | Implements Unsupported variant of PLIB_USB_ActivityPending
56 |
57 | Description:
58 | This template implements the Unsupported variant of the PLIB_USB_ActivityPending function.
59 | */
60 |
61 | PLIB_TEMPLATE bool USB_ActivityPending_Unsupported( USB_MODULE_ID index )
62 | {
63 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_ActivityPending");
64 |
65 | return false;
66 | }
67 |
68 |
69 | //******************************************************************************
70 | /* Function : USB_ExistsActivityPending_Unsupported
71 |
72 | Summary:
73 | Implements Unsupported variant of PLIB_USB_ExistsActivityPending
74 |
75 | Description:
76 | This template implements the Unsupported variant of the PLIB_USB_ExistsActivityPending function.
77 | */
78 |
79 | PLIB_TEMPLATE bool USB_ExistsActivityPending_Unsupported( USB_MODULE_ID index )
80 | {
81 | return false;
82 | }
83 |
84 |
85 | #endif /*_USB_ACTIVITYPENDING_UNSUPPORTED_H*/
86 |
87 | /******************************************************************************
88 | End of File
89 | */
90 |
91 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_FrameNumber_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_FrameNumber_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : FrameNumber
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_FrameNumberGet
16 | PLIB_USB_ExistsFrameNumber
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_FRAMENUMBER_UNSUPPORTED_H
47 | #define _USB_FRAMENUMBER_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_FrameNumberGet_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_FrameNumberGet
54 |
55 | Description:
56 | This template implements the Unsupported variant of the
57 | PLIB_USB_FrameNumberGet function.
58 | */
59 |
60 | PLIB_TEMPLATE uint16_t USB_FrameNumberGet_Unsupported( USB_MODULE_ID index )
61 | {
62 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_FrameNumberGet");
63 |
64 | return 0;
65 | }
66 |
67 |
68 | //******************************************************************************
69 | /* Function : USB_ExistsFrameNumber_Unsupported
70 |
71 | Summary:
72 | Implements Unsupported variant of PLIB_USB_ExistsFrameNumber
73 |
74 | Description:
75 | This template implements the Unsupported variant of the
76 | PLIB_USB_ExistsFrameNumber function.
77 | */
78 |
79 | PLIB_TEMPLATE bool USB_ExistsFrameNumber_Unsupported( USB_MODULE_ID index )
80 | {
81 | return false;
82 | }
83 |
84 |
85 | #endif /*_USB_FRAMENUMBER_UNSUPPORTED_H*/
86 |
87 | /******************************************************************************
88 | End of File
89 | */
90 |
91 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_HostBusyWithToken_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_HostBusyWithToken_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : HostBusyWithToken
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_IsBusyWithToken
16 | PLIB_USB_ExistsHostBusyWithToken
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_HOSTBUSYWITHTOKEN_UNSUPPORTED_H
47 | #define _USB_HOSTBUSYWITHTOKEN_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_IsBusyWithToken_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_IsBusyWithToken
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_IsBusyWithToken function.
57 | */
58 |
59 | PLIB_TEMPLATE bool USB_IsBusyWithToken_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_IsBusyWithToken");
62 |
63 | return false;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsHostBusyWithToken_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsHostBusyWithToken
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsHostBusyWithToken function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsHostBusyWithToken_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_HOSTBUSYWITHTOKEN_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_LastDirection_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_LastDirection_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : LastDirection
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_LastTransactionDirectionGet
16 | PLIB_USB_ExistsLastDirection
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_LASTDIRECTION_UNSUPPORTED_H
47 | #define _USB_LASTDIRECTION_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_LastTransactionDirectionGet_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_LastTransactionDirectionGet
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_LastTransactionDirectionGet function.
57 | */
58 |
59 | PLIB_TEMPLATE USB_BUFFER_DIRECTION USB_LastTransactionDirectionGet_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_LastTransactionDirectionGet");
62 |
63 | return 0;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsLastDirection_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsLastDirection
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsLastDirection function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsLastDirection_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_LASTDIRECTION_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_LastEndpoint_Default.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_LastEndpoint_Default.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : LastEndpoint
13 | and its Variant : Default
14 | For following APIs :
15 | PLIB_USB_LastTransactionEndPtGet
16 | PLIB_USB_ExistsLastEndpoint
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_LASTENDPOINT_DEFAULT_H
47 | #define _USB_LASTENDPOINT_DEFAULT_H
48 |
49 | #include "driver/usb/usbfs/src/templates/usbfs_registers.h"
50 |
51 | //******************************************************************************
52 | /* Function : USB_LastTransactionEndPtGet_Default
53 |
54 | Summary:
55 | Implements Default variant of PLIB_USB_LastTransactionEndPtGet
56 |
57 | Description:
58 | This template implements the Default variant of the PLIB_USB_LastTransactionEndPtGet function.
59 | */
60 |
61 | PLIB_TEMPLATE uint8_t USB_LastTransactionEndPtGet_Default( USB_MODULE_ID index )
62 | {
63 | volatile usb_registers_t * usb = ((usb_registers_t *)(index));
64 | return ( usb->UxSTAT.ENDPT);
65 | }
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsLastEndpoint_Default
69 |
70 | Summary:
71 | Implements Default variant of PLIB_USB_ExistsLastEndpoint
72 |
73 | Description:
74 | This template implements the Default variant of the PLIB_USB_ExistsLastEndpoint function.
75 | */
76 |
77 | #define PLIB_USB_ExistsLastEndpoint PLIB_USB_ExistsLastEndpoint
78 | PLIB_TEMPLATE bool USB_ExistsLastEndpoint_Default( USB_MODULE_ID index )
79 | {
80 | return true;
81 | }
82 |
83 |
84 | #endif /*_USB_LASTENDPOINT_DEFAULT_H*/
85 |
86 | /******************************************************************************
87 | End of File
88 | */
89 |
90 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_LastEndpoint_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_LastEndpoint_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : LastEndpoint
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_LastTransactionEndPtGet
16 | PLIB_USB_ExistsLastEndpoint
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_LASTENDPOINT_UNSUPPORTED_H
47 | #define _USB_LASTENDPOINT_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_LastTransactionEndPtGet_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_LastTransactionEndPtGet
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_LastTransactionEndPtGet function.
57 | */
58 |
59 | PLIB_TEMPLATE uint8_t USB_LastTransactionEndPtGet_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_LastTransactionEndPtGet");
62 |
63 | return 0;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsLastEndpoint_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsLastEndpoint
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsLastEndpoint function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsLastEndpoint_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_LASTENDPOINT_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_LastPingPong_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_LastPingPong_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : LastPingPong
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_LastTransactionPingPongStateGet
16 | PLIB_USB_ExistsLastPingPong
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_LASTPINGPONG_UNSUPPORTED_H
47 | #define _USB_LASTPINGPONG_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_LastTransactionPingPongStateGet_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_LastTransactionPingPongStateGet
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_LastTransactionPingPongStateGet function.
57 | */
58 |
59 | PLIB_TEMPLATE USB_PING_PONG_STATE USB_LastTransactionPingPongStateGet_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_LastTransactionPingPongStateGet");
62 |
63 | return 0;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsLastPingPong_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsLastPingPong
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsLastPingPong function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsLastPingPong_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_LASTPINGPONG_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_LiveJState_Default.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_LiveJState_Default.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : LiveJState
13 | and its Variant : Default
14 | For following APIs :
15 | PLIB_USB_JStateIsActive
16 | PLIB_USB_ExistsLiveJState
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_LIVEJSTATE_DEFAULT_H
47 | #define _USB_LIVEJSTATE_DEFAULT_H
48 |
49 | #include "driver/usb/usbfs/src/templates/usbfs_registers.h"
50 |
51 | //******************************************************************************
52 | /* Function : USB_JStateIsActive_Default
53 |
54 | Summary:
55 | Implements Default variant of PLIB_USB_JStateIsActive
56 |
57 | Description:
58 | This template implements the Default variant of the PLIB_USB_JStateIsActive function.
59 | */
60 |
61 | PLIB_TEMPLATE bool USB_JStateIsActive_Default( USB_MODULE_ID index )
62 | {
63 | volatile usb_registers_t * usb = ((usb_registers_t *)(index));
64 | return ( usb->UxCON.UxCONbits.JSTATE );
65 | }
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsLiveJState_Default
69 |
70 | Summary:
71 | Implements Default variant of PLIB_USB_ExistsLiveJState
72 |
73 | Description:
74 | This template implements the Default variant of the PLIB_USB_ExistsLiveJState function.
75 | */
76 |
77 | #define PLIB_USB_ExistsLiveJState PLIB_USB_ExistsLiveJState
78 | PLIB_TEMPLATE bool USB_ExistsLiveJState_Default( USB_MODULE_ID index )
79 | {
80 | return true;
81 | }
82 |
83 |
84 | #endif /*_USB_LIVEJSTATE_DEFAULT_H*/
85 |
86 | /******************************************************************************
87 | End of File
88 | */
89 |
90 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_LiveJState_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_LiveJState_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : LiveJState
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_JStateIsActive
16 | PLIB_USB_ExistsLiveJState
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_LIVEJSTATE_UNSUPPORTED_H
47 | #define _USB_LIVEJSTATE_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_JStateIsActive_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_JStateIsActive
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_JStateIsActive function.
57 | */
58 |
59 | PLIB_TEMPLATE bool USB_JStateIsActive_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_JStateIsActive");
62 |
63 | return false;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsLiveJState_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsLiveJState
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsLiveJState function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsLiveJState_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_LIVEJSTATE_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_LiveSingleEndedZero_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_LiveSingleEndedZero_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : LiveSingleEndedZero
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_SE0InProgress
16 | PLIB_USB_ExistsLiveSingleEndedZero
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_LIVESINGLEENDEDZERO_UNSUPPORTED_H
47 | #define _USB_LIVESINGLEENDEDZERO_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_SE0InProgress_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_SE0InProgress
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_SE0InProgress function.
57 | */
58 |
59 | PLIB_TEMPLATE bool USB_SE0InProgress_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_SE0InProgress");
62 |
63 | return false;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsLiveSingleEndedZero_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsLiveSingleEndedZero
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsLiveSingleEndedZero function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsLiveSingleEndedZero_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_LIVESINGLEENDEDZERO_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_ModuleBusy_Default.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_ModuleBusy_Default.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : ModuleBusy
13 | and its Variant : Default
14 | For following APIs :
15 | PLIB_USB_ModuleIsBusy
16 | PLIB_USB_ExistsModuleBusy
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_MODULEBUSY_DEFAULT_H
47 | #define _USB_MODULEBUSY_DEFAULT_H
48 |
49 | #include "driver/usb/usbfs/src/templates/usbfs_registers.h"
50 |
51 | //******************************************************************************
52 | /* Function : USB_ModuleIsBusy_Default
53 |
54 | Summary:
55 | Implements Default variant of PLIB_USB_ModuleIsBusy
56 |
57 | Description:
58 | This template implements the Default variant of the PLIB_USB_ModuleIsBusy function.
59 | */
60 |
61 | PLIB_TEMPLATE bool USB_ModuleIsBusy_Default( USB_MODULE_ID index )
62 | {
63 | volatile usb_registers_t * usb = ((usb_registers_t *)(index));
64 | return ( usb->UxPWRC.USBBUSY );
65 | }
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsModuleBusy_Default
69 |
70 | Summary:
71 | Implements Default variant of PLIB_USB_ExistsModuleBusy
72 |
73 | Description:
74 | This template implements the Default variant of the PLIB_USB_ExistsModuleBusy function.
75 | */
76 |
77 | #define PLIB_USB_ExistsModuleBusy PLIB_USB_ExistsModuleBusy
78 | PLIB_TEMPLATE bool USB_ExistsModuleBusy_Default( USB_MODULE_ID index )
79 | {
80 | return true;
81 | }
82 |
83 |
84 | #endif /*_USB_MODULEBUSY_DEFAULT_H*/
85 |
86 | /******************************************************************************
87 | End of File
88 | */
89 |
90 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_ModuleBusy_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_ModuleBusy_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : ModuleBusy
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_ModuleIsBusy
16 | PLIB_USB_ExistsModuleBusy
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_MODULEBUSY_UNSUPPORTED_H
47 | #define _USB_MODULEBUSY_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_ModuleIsBusy_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_ModuleIsBusy
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_ModuleIsBusy function.
57 | */
58 |
59 | PLIB_TEMPLATE bool USB_ModuleIsBusy_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_ModuleIsBusy");
62 |
63 | return false;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsModuleBusy_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsModuleBusy
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsModuleBusy function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsModuleBusy_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_MODULEBUSY_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_NextTokenSpeed_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_NextTokenSpeed_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : NextTokenSpeed
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_TokenSpeedSelect
16 | PLIB_USB_ExistsNextTokenSpeed
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_NEXTTOKENSPEED_UNSUPPORTED_H
47 | #define _USB_NEXTTOKENSPEED_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_TokenSpeedSelect_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_TokenSpeedSelect
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_TokenSpeedSelect function.
57 | */
58 |
59 | PLIB_TEMPLATE void USB_TokenSpeedSelect_Unsupported( USB_MODULE_ID index , USB_TOKEN_SPEED tokenSpeed )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_TokenSpeedSelect");
62 | }
63 |
64 |
65 | //******************************************************************************
66 | /* Function : USB_ExistsNextTokenSpeed_Unsupported
67 |
68 | Summary:
69 | Implements Unsupported variant of PLIB_USB_ExistsNextTokenSpeed
70 |
71 | Description:
72 | This template implements the Unsupported variant of the PLIB_USB_ExistsNextTokenSpeed function.
73 | */
74 |
75 | PLIB_TEMPLATE bool USB_ExistsNextTokenSpeed_Unsupported( USB_MODULE_ID index )
76 | {
77 | return false;
78 | }
79 |
80 |
81 | #endif /*_USB_NEXTTOKENSPEED_UNSUPPORTED_H*/
82 |
83 | /******************************************************************************
84 | End of File
85 | */
86 |
87 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_OTG_ASessionValid_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_OTG_ASessionValid_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : OTG_ASessionValid
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_OTG_VBusValid
16 | PLIB_USB_ExistsOTG_ASessionValid
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_OTG_ASESSIONVALID_UNSUPPORTED_H
47 | #define _USB_OTG_ASESSIONVALID_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_OTG_VBusValid_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_OTG_VBusValid
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_OTG_VBusValid function.
57 | */
58 |
59 | PLIB_TEMPLATE bool USB_OTG_VBusValid_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_OTG_VBusValid");
62 |
63 | return false;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsOTG_ASessionValid_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsOTG_ASessionValid
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsOTG_ASessionValid function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsOTG_ASessionValid_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_OTG_ASESSIONVALID_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_OTG_BSessionEnd_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_OTG_BSessionEnd_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : OTG_BSessionEnd
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_OTG_BSessionHasEnded
16 | PLIB_USB_ExistsOTG_BSessionEnd
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_OTG_BSESSIONEND_UNSUPPORTED_H
47 | #define _USB_OTG_BSESSIONEND_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_OTG_BSessionHasEnded_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_OTG_BSessionHasEnded
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_OTG_BSessionHasEnded function.
57 | */
58 |
59 | PLIB_TEMPLATE bool USB_OTG_BSessionHasEnded_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_OTG_BSessionHasEnded");
62 |
63 | return false;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsOTG_BSessionEnd_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsOTG_BSessionEnd
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsOTG_BSessionEnd function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsOTG_BSessionEnd_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_OTG_BSESSIONEND_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_OTG_IDPinState_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_OTG_IDPinState_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : OTG_IDPinState
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_OTG_IDPinStateIsTypeA
16 | PLIB_USB_ExistsOTG_IDPinState
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_OTG_IDPINSTATE_UNSUPPORTED_H
47 | #define _USB_OTG_IDPINSTATE_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_OTG_IDPinStateIsTypeA_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_OTG_IDPinStateIsTypeA
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_OTG_IDPinStateIsTypeA function.
57 | */
58 |
59 | PLIB_TEMPLATE bool USB_OTG_IDPinStateIsTypeA_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_OTG_IDPinStateIsTypeA");
62 |
63 | return false;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsOTG_IDPinState_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsOTG_IDPinState
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsOTG_IDPinState function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsOTG_IDPinState_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_OTG_IDPINSTATE_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_OTG_LineState_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_OTG_LineState_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : OTG_LineState
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_OTG_LineStateIsStable
16 | PLIB_USB_ExistsOTG_LineState
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_OTG_LINESTATE_UNSUPPORTED_H
47 | #define _USB_OTG_LINESTATE_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_OTG_LineStateIsStable_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_OTG_LineStateIsStable
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_OTG_LineStateIsStable function.
57 | */
58 |
59 | PLIB_TEMPLATE bool USB_OTG_LineStateIsStable_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_OTG_LineStateIsStable");
62 |
63 | return false;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsOTG_LineState_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsOTG_LineState
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsOTG_LineState function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsOTG_LineState_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_OTG_LINESTATE_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_OTG_SessionValid_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_OTG_SessionValid_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : OTG_SessionValid
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_OTG_SessionValid
16 | PLIB_USB_ExistsOTG_SessionValid
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_OTG_SESSIONVALID_UNSUPPORTED_H
47 | #define _USB_OTG_SESSIONVALID_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_OTG_SessionValid_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_OTG_SessionValid
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_OTG_SessionValid function.
57 | */
58 |
59 | PLIB_TEMPLATE bool USB_OTG_SessionValid_Unsupported( USB_MODULE_ID index )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_OTG_SessionValid");
62 |
63 | return false;
64 | }
65 |
66 |
67 | //******************************************************************************
68 | /* Function : USB_ExistsOTG_SessionValid_Unsupported
69 |
70 | Summary:
71 | Implements Unsupported variant of PLIB_USB_ExistsOTG_SessionValid
72 |
73 | Description:
74 | This template implements the Unsupported variant of the PLIB_USB_ExistsOTG_SessionValid function.
75 | */
76 |
77 | PLIB_TEMPLATE bool USB_ExistsOTG_SessionValid_Unsupported( USB_MODULE_ID index )
78 | {
79 | return false;
80 | }
81 |
82 |
83 | #endif /*_USB_OTG_SESSIONVALID_UNSUPPORTED_H*/
84 |
85 | /******************************************************************************
86 | End of File
87 | */
88 |
89 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/driver/usb/usbfs/src/templates/usb_OpModeSelect_Unsupported.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB Peripheral Library Template Implementation
3 |
4 | File Name:
5 | usb_OpModeSelect_Unsupported.h
6 |
7 | Summary:
8 | USB PLIB Template Implementation
9 |
10 | Description:
11 | This header file contains template implementations
12 | For Feature : OpModeSelect
13 | and its Variant : Unsupported
14 | For following APIs :
15 | PLIB_USB_OperatingModeSelect
16 | PLIB_USB_ExistsOpModeSelect
17 |
18 | *******************************************************************************/
19 |
20 | //DOM-IGNORE-BEGIN
21 | /*******************************************************************************
22 | Copyright (c) 2012 released Microchip Technology Inc. All rights reserved.
23 |
24 | Microchip licenses to you the right to use, modify, copy and distribute
25 | Software only when embedded on a Microchip microcontroller or digital signal
26 | controller that is integrated into your product or third party product
27 | (pursuant to the sublicense terms in the accompanying license agreement).
28 |
29 | You should refer to the license agreement accompanying this Software for
30 | additional information regarding your rights and obligations.
31 |
32 | SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
33 | EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF
34 | MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE.
35 | IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER
36 | CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR
37 | OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
38 | INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR
39 | CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF
40 | SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
41 | (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
42 | *******************************************************************************/
43 |
44 | //DOM-IGNORE-END
45 |
46 | #ifndef _USB_OPMODESELECT_UNSUPPORTED_H
47 | #define _USB_OPMODESELECT_UNSUPPORTED_H
48 |
49 | //******************************************************************************
50 | /* Function : USB_OperatingModeSelect_Unsupported
51 |
52 | Summary:
53 | Implements Unsupported variant of PLIB_USB_OperatingModeSelect
54 |
55 | Description:
56 | This template implements the Unsupported variant of the PLIB_USB_OperatingModeSelect function.
57 | */
58 |
59 | PLIB_TEMPLATE void USB_OperatingModeSelect_Unsupported( USB_MODULE_ID index , USB_OPMODES opMode )
60 | {
61 | PLIB_ASSERT(false, "The device selected does not implement PLIB_USB_OperatingModeSelect");
62 | }
63 |
64 |
65 | //******************************************************************************
66 | /* Function : USB_ExistsOpModeSelect_Unsupported
67 |
68 | Summary:
69 | Implements Unsupported variant of PLIB_USB_ExistsOpModeSelect
70 |
71 | Description:
72 | This template implements the Unsupported variant of the PLIB_USB_ExistsOpModeSelect function.
73 | */
74 |
75 | PLIB_TEMPLATE bool USB_ExistsOpModeSelect_Unsupported( USB_MODULE_ID index )
76 | {
77 | return false;
78 | }
79 |
80 |
81 | #endif /*_USB_OPMODESELECT_UNSUPPORTED_H*/
82 |
83 | /******************************************************************************
84 | End of File
85 | */
86 |
87 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/harmony-manifest-success.yml:
--------------------------------------------------------------------------------
1 |
2 | # This file has been autogenerated by MPLAB Harmony Configurator. Please do not edit this file.
3 | # Project "cdc_com_port_single" has been created by using mentioned Harmony 3 packages
4 |
5 |
6 | project: cdc_com_port_single
7 | creation_date: 2022-01-31T08:52:00.634+05:30[Asia/Calcutta] # ISO 8601 format: https://www.w3.org/TR/NOTE-datetime
8 | operating_system: Windows 10
9 | mhc_mode: IDE # [IDE|Standalone|Headless]
10 | mhc_version: v3.8.3
11 | mplabx_version: v6.00 # if MPLAB X plugin only
12 | plugin_version: v3.6.4 # if MPLAB X plugin only
13 | compiler: xc32 (4.00)
14 |
15 | modules:
16 | - {name: "csp", version: "v3.11.0"}
17 | - {name: "core", version: "v3.10.0"}
18 | - {name: "usb", version: "v3.9.0"}
19 | - {name: "dev_packs", version: "v3.11.1"}
20 | - {name: "bsp", version: "v3.11.0"}
21 |
22 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/interrupts.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | System Interrupts File
3 |
4 | Company:
5 | Microchip Technology Inc.
6 |
7 | File Name:
8 | interrupt.h
9 |
10 | Summary:
11 | Interrupt vectors mapping
12 |
13 | Description:
14 | This file contains declarations of device vectors used by Harmony 3
15 | *******************************************************************************/
16 |
17 | // DOM-IGNORE-BEGIN
18 | /*******************************************************************************
19 | * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
20 | *
21 | * Subject to your compliance with these terms, you may use Microchip software
22 | * and any derivatives exclusively with Microchip products. It is your
23 | * responsibility to comply with third party license terms applicable to your
24 | * use of third party software (including open source software) that may
25 | * accompany Microchip software.
26 | *
27 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
28 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
29 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
30 | * PARTICULAR PURPOSE.
31 | *
32 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
33 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
34 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
35 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
36 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
37 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
38 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
39 | *******************************************************************************/
40 | // DOM-IGNORE-END
41 |
42 | #ifndef INTERRUPTS_H
43 | #define INTERRUPTS_H
44 |
45 | // *****************************************************************************
46 | // *****************************************************************************
47 | // Section: Included Files
48 | // *****************************************************************************
49 | // *****************************************************************************
50 | #include
51 |
52 |
53 |
54 | // *****************************************************************************
55 | // *****************************************************************************
56 | // Section: Handler Routines
57 | // *****************************************************************************
58 | // *****************************************************************************
59 |
60 |
61 |
62 | #endif // INTERRUPTS_H
63 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/osal/osal_definitions.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries.
3 | *
4 | * Subject to your compliance with these terms, you may use Microchip software
5 | * and any derivatives exclusively with Microchip products. It is your
6 | * responsibility to comply with third party license terms applicable to your
7 | * use of third party software (including open source software) that may
8 | * accompany Microchip software.
9 | *
10 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
11 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
12 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
13 | * PARTICULAR PURPOSE.
14 | *
15 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
16 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
17 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
18 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
19 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
20 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
21 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
22 | *******************************************************************************/
23 |
24 | #ifndef __OSAL_DEFINITIONS_H
25 | #define __OSAL_DEFINITIONS_H
26 |
27 | #include "osal/osal_impl_basic.h"
28 | #endif//__OSAL_DEFINITIONS_H
29 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/pic32mx470_curiosity.mhc/BSP_PIC32MX470_Curiosity_Development_Board.yml:
--------------------------------------------------------------------------------
1 | format_version: v1.0
2 | type: UniqueComponent
3 | attributes: {id: BSP_PIC32MX470_Curiosity_Development_Board, bsp: 'true'}
4 | children:
5 | - type: ElementPosition
6 | attributes: {x: '138', y: '9', id: BSP_PIC32MX470_Curiosity_Development_Board}
7 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/pic32mx470_curiosity.mhc/GraphSettings.yml:
--------------------------------------------------------------------------------
1 | format_version: v1.0
2 | type: GraphSettings
3 | attributes: {canvasWidth: '400', id: GraphSettings, canvasHeight: '400'}
4 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/pic32mx470_curiosity.mhc/dfp.yml:
--------------------------------------------------------------------------------
1 | format_version: v1.0
2 | type: UniqueComponent
3 | attributes: {id: dfp}
4 | children:
5 | - type: ElementPosition
6 | attributes: {x: '139', y: '61', id: dfp}
7 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/pic32mx470_curiosity.mhc/drv_usbfs_v1.yml:
--------------------------------------------------------------------------------
1 | format_version: v1.0
2 | type: UniqueComponent
3 | attributes: {id: drv_usbfs_v1}
4 | children:
5 | - type: ElementPosition
6 | attributes: {x: '0', y: '144', id: drv_usbfs_v1}
7 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/pic32mx470_curiosity.mhc/mcc.txt:
--------------------------------------------------------------------------------
1 | MHC project converted to MCC
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/pic32mx470_curiosity.mhc/settings.yml:
--------------------------------------------------------------------------------
1 | configName: pic32mx470_curiosity
2 | folderName: ''
3 | format_version: v1.0
4 | frameworkPath: ../../..
5 | processor: PIC32MX470F512H
6 | projectName: ''
7 | settings:
8 | PackageFilter: bsp;core;csp;quick_docs;usb;
9 | FORCE_OPTIMIZATION: 'false'
10 | GENERATE_BACKUP: 'true'
11 | CMSISPath: .\dev_packs\arm\CMSIS\5.7.0
12 | MERGE_STRATEGY: USER_ALL
13 | DFPPath: .\dev_packs\Microchip\PIC32MX_DFP\1.5.259\atdf\PIC32MX470F512H.atdf
14 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/pic32mx470_curiosity.mhc/usb_device.yml:
--------------------------------------------------------------------------------
1 | format_version: v1.0
2 | type: UniqueComponent
3 | attributes: {id: usb_device}
4 | children:
5 | - type: Symbols
6 | children:
7 | - type: Integer
8 | attributes: {id: CONFIG_USB_DEVICE_CONFIG_DESCRPTR_SIZE}
9 | children:
10 | - type: Values
11 | children:
12 | - type: Dynamic
13 | attributes: {id: usb_device, value: '67'}
14 | - type: Integer
15 | attributes: {id: CONFIG_USB_DEVICE_ENDPOINTS_NUMBER}
16 | children:
17 | - type: Values
18 | children:
19 | - type: Dynamic
20 | attributes: {id: usb_device, value: '3'}
21 | - type: Boolean
22 | attributes: {id: CONFIG_USB_DEVICE_EVENT_ENABLE_SOF}
23 | children:
24 | - type: Values
25 | children:
26 | - type: User
27 | attributes: {value: 'true'}
28 | - type: Integer
29 | attributes: {id: CONFIG_USB_DEVICE_FUNCTIONS_NUMBER}
30 | children:
31 | - type: Values
32 | children:
33 | - type: Dynamic
34 | attributes: {id: usb_device, value: '1'}
35 | - type: Integer
36 | attributes: {id: CONFIG_USB_DEVICE_INTERFACES_NUMBER}
37 | children:
38 | - type: Values
39 | children:
40 | - type: Dynamic
41 | attributes: {id: usb_device, value: '2'}
42 | - type: Boolean
43 | attributes: {id: CONFIG_USB_DEVICE_MSD_DISK_IMAGE}
44 | children:
45 | - type: Values
46 | children:
47 | - type: Dynamic
48 | attributes: {id: usb_device, value: 'false'}
49 | - type: String
50 | attributes: {id: CONFIG_USB_DEVICE_PRODUCT_ID_IDX0}
51 | children:
52 | - type: Values
53 | children:
54 | - type: Dynamic
55 | attributes: {id: usb_device, value: '0x000A'}
56 | - type: Combo
57 | attributes: {id: CONFIG_USB_DEVICE_PRODUCT_ID_SELECTION_IDX0}
58 | children:
59 | - type: Values
60 | children:
61 | - type: User
62 | attributes: {value: cdc_com_port_single_demo}
63 | - type: String
64 | attributes: {id: CONFIG_USB_DEVICE_PRODUCT_STRING_DESCRIPTOR}
65 | children:
66 | - type: Values
67 | children:
68 | - type: Dynamic
69 | attributes: {id: usb_device, value: Simple CDC Device Demo}
70 | - type: ElementPosition
71 | attributes: {x: '153', y: '145', id: usb_device}
72 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/pic32mx470_curiosity.mhc/usb_device_cdc.yml:
--------------------------------------------------------------------------------
1 | format_version: v1.0
2 | type: GeneratorComponent
3 | attributes: {id: usb_device_cdc}
4 | children:
5 | - type: Symbols
6 | children:
7 | - type: Integer
8 | attributes: {id: CONFIG_USB_DEVICE_CDC_QUEUE_DEPTH_COMBINED}
9 | children:
10 | - type: Values
11 | children:
12 | - type: Dynamic
13 | attributes: {id: usb_device_cdc, value: '6'}
14 | - type: Instances
15 | children:
16 | - type: InstanceComponent
17 | attributes: {instance: '0', id: usb_device_cdc}
18 | children:
19 | - type: Symbols
20 | children:
21 | - type: Integer
22 | attributes: {id: CONFIG_USB_DEVICE_FUNCTION_BULK_IN_ENDPOINT_NUMBER}
23 | children:
24 | - type: Values
25 | children:
26 | - type: Dynamic
27 | attributes: {id: usb_device_cdc_0, value: '3'}
28 | - type: Integer
29 | attributes: {id: CONFIG_USB_DEVICE_FUNCTION_BULK_OUT_ENDPOINT_NUMBER}
30 | children:
31 | - type: Values
32 | children:
33 | - type: Dynamic
34 | attributes: {id: usb_device_cdc_0, value: '2'}
35 | - type: Integer
36 | attributes: {id: CONFIG_USB_DEVICE_FUNCTION_INTERFACE_NUMBER}
37 | children:
38 | - type: Values
39 | children:
40 | - type: Dynamic
41 | attributes: {id: usb_device_cdc_0, value: '0'}
42 | - type: Integer
43 | attributes: {id: CONFIG_USB_DEVICE_FUNCTION_INT_ENDPOINT_NUMBER}
44 | children:
45 | - type: Values
46 | children:
47 | - type: Dynamic
48 | attributes: {id: usb_device_cdc_0, value: '1'}
49 | - type: ElementPosition
50 | attributes: {x: '293', y: '146', id: usb_device_cdc}
51 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/stdio/xc32_monitor.c:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | Debug Console Source file
3 |
4 | Company:
5 | Microchip Technology Inc.
6 |
7 | File Name:
8 | xc32_monitor.c
9 |
10 | Summary:
11 | debug console Source File
12 |
13 | Description:
14 | None
15 |
16 | *******************************************************************************/
17 |
18 | /*******************************************************************************
19 | * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
20 | *
21 | * Subject to your compliance with these terms, you may use Microchip software
22 | * and any derivatives exclusively with Microchip products. It is your
23 | * responsibility to comply with third party license terms applicable to your
24 | * use of third party software (including open source software) that may
25 | * accompany Microchip software.
26 | *
27 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
28 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
29 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
30 | * PARTICULAR PURPOSE.
31 | *
32 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
33 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
34 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
35 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
36 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
37 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
38 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
39 | *******************************************************************************/
40 |
41 |
42 | #ifdef __arm__
43 | /* Declaration of these functions are missing in stdio.h for ARM parts*/
44 | int _mon_getc(int canblock);
45 | void _mon_putc(char c);
46 | #endif //__arm__
47 |
48 | int _mon_getc(int canblock)
49 | {
50 | (void)canblock;
51 | return 0;
52 | }
53 |
54 | void _mon_putc(char c)
55 | {
56 | (void)c;
57 | }
58 |
59 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/system/int/sys_int_mapping.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | Interrupt System Service Mapping File
3 |
4 | Company:
5 | Microchip Technology Inc.
6 |
7 | File Name:
8 | sys_int_mapping.h
9 |
10 | Summary:
11 | Interrupt System Service mapping file.
12 |
13 | Description:
14 | This header file contains the mapping of the APIs defined in the API header
15 | to either the function implementations or macro implementation or the
16 | specific variant implementation.
17 | *******************************************************************************/
18 |
19 | //DOM-IGNORE-BEGIN
20 | /******************************************************************************
21 | * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
22 | *
23 | * Subject to your compliance with these terms, you may use Microchip software
24 | * and any derivatives exclusively with Microchip products. It is your
25 | * responsibility to comply with third party license terms applicable to your
26 | * use of third party software (including open source software) that may
27 | * accompany Microchip software.
28 | *
29 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
30 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
31 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
32 | * PARTICULAR PURPOSE.
33 | *
34 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
35 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
36 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
37 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
38 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
39 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
40 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
41 | *******************************************************************************/
42 | //DOM-IGNORE-END
43 |
44 | #ifndef SYS_INT_MAPPING_H
45 | #define SYS_INT_MAPPING_H
46 |
47 | // *****************************************************************************
48 | // *****************************************************************************
49 | // Section: Interrupt System Service Mapping
50 | // *****************************************************************************
51 | // *****************************************************************************
52 |
53 | #define SYS_INT_IsEnabled() ((bool)(_CP0_GET_STATUS() & 0x01))
54 | #define SYS_INT_SourceEnable( source ) EVIC_SourceEnable( source )
55 | #define SYS_INT_SourceIsEnabled( source ) EVIC_SourceIsEnabled( source )
56 | #define SYS_INT_SourceStatusGet( source ) EVIC_SourceStatusGet( source )
57 | #define SYS_INT_SourceStatusSet( source ) EVIC_SourceStatusSet( source )
58 | #define SYS_INT_SourceStatusClear( source ) EVIC_SourceStatusClear( source )
59 |
60 | #endif // SYS_INT_MAPPING_H
61 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/system/system.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | Driver Layer Interface Header
3 |
4 | Company:
5 | Microchip Technology Inc.
6 |
7 | File Name:
8 | driver.h
9 |
10 | Summary:
11 | Driver layer data types and definitions.
12 |
13 | Description:
14 | This file defines the common macros and definitions for the driver layer
15 | modules.
16 |
17 | Remarks:
18 | The parent directory to the "system" directory should be added to the
19 | compiler's search path for header files such that the following include
20 | statement will successfully include this file.
21 |
22 | #include "system/system.h"
23 | *******************************************************************************/
24 |
25 | //DOM-IGNORE-BEGIN
26 | /*******************************************************************************
27 | * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
28 | *
29 | * Subject to your compliance with these terms, you may use Microchip software
30 | * and any derivatives exclusively with Microchip products. It is your
31 | * responsibility to comply with third party license terms applicable to your
32 | * use of third party software (including open source software) that may
33 | * accompany Microchip software.
34 | *
35 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
36 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
37 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
38 | * PARTICULAR PURPOSE.
39 | *
40 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
41 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
42 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
43 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
44 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
45 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
46 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
47 | *******************************************************************************/
48 | //DOM-IGNORE-END
49 |
50 | #ifndef SYSTEM_H
51 | #define SYSTEM_H
52 |
53 |
54 | // *****************************************************************************
55 | // *****************************************************************************
56 | // Section: Included Files
57 | // *****************************************************************************
58 | // *****************************************************************************
59 |
60 | #include "system/system_common.h"
61 | #include "system/system_module.h"
62 |
63 |
64 | #endif // SYSTEM_H
65 | /*******************************************************************************
66 | End of File
67 | */
68 |
69 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/toolchain_specifics.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries.
3 | *
4 | * Subject to your compliance with these terms, you may use Microchip software
5 | * and any derivatives exclusively with Microchip products. It is your
6 | * responsibility to comply with third party license terms applicable to your
7 | * use of third party software (including open source software) that may
8 | * accompany Microchip software.
9 | *
10 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
11 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
12 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
13 | * PARTICULAR PURPOSE.
14 | *
15 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
16 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
17 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
18 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
19 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
20 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
21 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
22 | *******************************************************************************/
23 |
24 | #ifndef TOOLCHAIN_SPECIFICS_H
25 | #define TOOLCHAIN_SPECIFICS_H
26 |
27 | #include
28 |
29 | #define NO_INIT __attribute__((section(".no_init")))
30 | #define SECTION(a) __attribute__((__section__(a)))
31 |
32 | #ifndef __ASM
33 | #define __ASM __asm__
34 | #endif
35 | #ifndef __INLINE
36 | #define __INLINE __inline__
37 | #endif
38 | #ifndef __STATIC_INLINE
39 | #define __STATIC_INLINE static __inline__
40 | #endif
41 | #ifndef __STATIC_FORCEINLINE
42 | #define __STATIC_FORCEINLINE __attribute__((always_inline)) static __inline__
43 | #endif
44 | #ifndef __NO_RETURN
45 | #define __NO_RETURN __attribute__((__noreturn__))
46 | #endif
47 | #ifndef __USED
48 | #define __USED __attribute__((used))
49 | #endif
50 | #ifndef __WEAK
51 | #define __WEAK __attribute__((weak))
52 | #endif
53 | #ifndef __PACKED
54 | #define __PACKED __attribute__((packed, aligned(1)))
55 | #endif
56 | #ifndef __PACKED_STRUCT
57 | #define __PACKED_STRUCT struct __attribute__((packed, aligned(1)))
58 | #endif
59 | #ifndef __PACKED_UNION
60 | #define __PACKED_UNION union __attribute__((packed, aligned(1)))
61 | #endif
62 | #ifndef __COHERENT
63 | #define __COHERENT __attribute__((coherent))
64 | #endif
65 | #ifndef __ALIGNED
66 | #define __ALIGNED(x) __attribute__((aligned(x)))
67 | #endif
68 | #ifndef __RESTRICT
69 | #define __RESTRICT __restrict__
70 | #endif
71 |
72 | #define CACHE_LINE_SIZE (4u)
73 | #define CACHE_ALIGN
74 |
75 | #define CACHE_ALIGNED_SIZE_GET(size) (size + ((size % CACHE_LINE_SIZE)? (CACHE_LINE_SIZE - (size % CACHE_LINE_SIZE)) : 0))
76 |
77 | #ifndef FORMAT_ATTRIBUTE
78 | #define FORMAT_ATTRIBUTE(archetype, string_index, first_to_check) __attribute__ ((format (archetype, string_index, first_to_check)))
79 | #endif
80 |
81 | #endif // end of header
82 |
83 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/usb/src/usb_external_dependencies.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | USB stack external dependencies file
3 |
4 | Company:
5 | Microchip Technology Inc.
6 |
7 | File Name:
8 | usb_external_dependencies.h
9 |
10 | Summary:
11 | USB stack external dependencies file
12 |
13 | Description:
14 | USB stack external dependencies file.
15 | *******************************************************************************/
16 |
17 | //DOM-IGNORE-BEGIN
18 | /*******************************************************************************
19 | * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
20 | *
21 | * Subject to your compliance with these terms, you may use Microchip software
22 | * and any derivatives exclusively with Microchip products. It is your
23 | * responsibility to comply with third party license terms applicable to your
24 | * use of third party software (including open source software) that may
25 | * accompany Microchip software.
26 | *
27 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
28 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
29 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
30 | * PARTICULAR PURPOSE.
31 | *
32 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
33 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
34 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
35 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
36 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
37 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
38 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
39 | *******************************************************************************/
40 | //DOM-IGNORE-END
41 |
42 | #ifndef _USB_EXTERNAL_DEPENDENCIES_H
43 | #define _USB_EXTERNAL_DEPENDENCIES_H
44 |
45 | #include
46 | #include "system/system_common.h"
47 | #include "configuration.h"
48 | #include "system/system_module.h"
49 |
50 | #if defined (USB_HOST_DEVICES_NUMBER) && (USB_HOST_DEVICES_NUMBER > 0)
51 | #include "system/time/sys_time.h"
52 | #define SYS_TMR_HANDLE_INVALID SYS_TIME_HANDLE_INVALID
53 | #define SYS_TMR_CallbackSingle(delay,context,callback) SYS_TIME_CallbackRegisterMS(callback,context,delay, SYS_TIME_SINGLE)
54 | #endif
55 |
56 | #ifndef SYS_DEBUG_ENABLE
57 |
58 | #define SYS_DEBUG_PRINT(level, format, ...)
59 | #define SYS_DEBUG_MESSAGE(a,b, ...)
60 | #define SYS_DEBUG(a,b)
61 | #else
62 | #include "system/debug/sys_debug.h"
63 | #endif
64 | #endif
65 | /*******************************************************************************
66 | End of File
67 | */
--------------------------------------------------------------------------------
/cutcutgo.X/src/config/cutcutgo/user.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (C) 2021 Microchip Technology Inc. and its subsidiaries.
3 | *
4 | * Subject to your compliance with these terms, you may use Microchip software
5 | * and any derivatives exclusively with Microchip products. It is your
6 | * responsibility to comply with third party license terms applicable to your
7 | * use of third party software (including open source software) that may
8 | * accompany Microchip software.
9 | *
10 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
11 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
12 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
13 | * PARTICULAR PURPOSE.
14 | *
15 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
16 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
17 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
18 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
19 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
20 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
21 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
22 | *******************************************************************************/
23 |
24 | /*******************************************************************************
25 | User Configuration Header
26 |
27 | File Name:
28 | user.h
29 |
30 | Summary:
31 | Build-time configuration header for the user defined by this project.
32 |
33 | Description:
34 | An MPLAB Project may have multiple configurations. This file defines the
35 | build-time options for a single configuration.
36 |
37 | Remarks:
38 | It only provides macro definitions for build-time configuration options
39 |
40 | *******************************************************************************/
41 |
42 | #ifndef USER_H
43 | #define USER_H
44 |
45 | // DOM-IGNORE-BEGIN
46 | #ifdef __cplusplus // Provide C++ Compatibility
47 |
48 | extern "C" {
49 |
50 | #endif
51 | // DOM-IGNORE-END
52 |
53 | // *****************************************************************************
54 | // *****************************************************************************
55 | // Section: User Configuration macros
56 | // *****************************************************************************
57 | // *****************************************************************************
58 | #define APP_USB_SWITCH_DEBOUNCE_COUNT_FS 150
59 | #define APP_USB_SWITCH_DEBOUNCE_COUNT_HS 1200
60 |
61 |
62 | //DOM-IGNORE-BEGIN
63 | #ifdef __cplusplus
64 | }
65 | #endif
66 | //DOM-IGNORE-END
67 |
68 | #endif // USER_H
69 | /*******************************************************************************
70 | End of File
71 | */
72 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/.gitignore:
--------------------------------------------------------------------------------
1 | *.hex
2 | *.o
3 | *.elf
4 | *.DS_Store
5 | *.d
6 |
7 | README.md
8 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/doc/csv/alarm_codes_en_US.csv:
--------------------------------------------------------------------------------
1 | "Alarm Code in v1.1+"," Alarm Message in v1.0-"," Alarm Description"
2 | "1","Hard limit","Hard limit has been triggered. Machine position is likely lost due to sudden halt. Re-homing is highly recommended."
3 | "2","Soft limit","Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained. Alarm may be safely unlocked."
4 | "3","Abort during cycle","Reset while in motion. Machine position is likely lost due to sudden halt. Re-homing is highly recommended."
5 | "4","Probe fail","Probe fail. Probe is not in the expected initial state before starting probe cycle when G38.2 and G38.3 is not triggered and G38.4 and G38.5 is triggered."
6 | "5","Probe fail","Probe fail. Probe did not contact the workpiece within the programmed travel for G38.2 and G38.4."
7 | "6","Homing fail","Homing fail. The active homing cycle was reset."
8 | "7","Homing fail","Homing fail. Safety door was opened during homing cycle."
9 | "8","Homing fail","Homing fail. Pull off travel failed to clear limit switch. Try increasing pull-off setting or check wiring."
10 | "9","Homing fail","Homing fail. Could not find limit switch within search distances. Try increasing max travel, decreasing pull-off distance, or check wiring."
11 | "10","Homing fail","Homing fail. Second dual axis limit switch failed to trigger within configured search distance after first. Try increasing trigger fail distance or check wiring."
12 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/doc/csv/build_option_codes_en_US.csv:
--------------------------------------------------------------------------------
1 | OPT: Code, Build-Option Description,State
2 | V,Variable spindle,Enabled
3 | N,Line numbers,Enabled
4 | M,Mist coolant M7,Enabled
5 | C,CoreXY,Enabled
6 | P,Parking motion,Enabled
7 | Z,Homing force origin,Enabled
8 | H,Homing single axis commands,Enabled
9 | T,Two limit switches on axis,Enabled
10 | A,Allow feed rate overrides in probe cycles,Enabled
11 | D,Use spindle direction as enable pin,Enabled
12 | 0,Spindle enable off when speed is zero,Enabled
13 | S,Software limit pin debouncing,Enabled
14 | R,Parking override control,Enabled
15 | +,Safety door input pin,Enabled
16 | *,Restore all EEPROM command,Disabled
17 | $,Restore EEPROM `$` settings command,Disabled
18 | #,Restore EEPROM parameter data command,Disabled
19 | I,Build info write user string command,Disabled
20 | E,Force sync upon EEPROM write,Disabled
21 | W,Force sync upon work coordinate offset change,Disabled
22 | L,Homing initialization auto-lock,Disabled
23 | 2,Dual axis motors,Enabled
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/doc/csv/error_codes_en_US.csv:
--------------------------------------------------------------------------------
1 | "Error Code in v1.1+","Error Message in v1.0-","Error Description"
2 | "1","Expected command letter","G-code words consist of a letter and a value. Letter was not found."
3 | "2","Bad number format","Missing the expected G-code word value or numeric value format is not valid."
4 | "3","Invalid statement","Grbl '$' system command was not recognized or supported."
5 | "4","Value < 0","Negative value received for an expected positive value."
6 | "5","Setting disabled","Homing cycle failure. Homing is not enabled via settings."
7 | "6","Value < 3 usec","Minimum step pulse time must be greater than 3usec."
8 | "7","EEPROM read fail. Using defaults","An EEPROM read failed. Auto-restoring affected EEPROM to default values."
9 | "8","Not idle","Grbl '$' command cannot be used unless Grbl is IDLE. Ensures smooth operation during a job."
10 | "9","G-code lock","G-code commands are locked out during alarm or jog state."
11 | "10","Homing not enabled","Soft limits cannot be enabled without homing also enabled."
12 | "11","Line overflow","Max characters per line exceeded. Received command line was not executed."
13 | "12","Step rate > 30kHz","Grbl '$' setting value cause the step rate to exceed the maximum supported."
14 | "13","Check Door","Safety door detected as opened and door state initiated."
15 | "14","Line length exceeded","Build info or startup line exceeded EEPROM line length limit. Line not stored."
16 | "15","Travel exceeded","Jog target exceeds machine travel. Jog command has been ignored."
17 | "16","Invalid jog command","Jog command has no '=' or contains prohibited g-code."
18 | "17","Setting disabled","Laser mode requires PWM output."
19 | "20","Unsupported command","Unsupported or invalid g-code command found in block."
20 | "21","Modal group violation","More than one g-code command from same modal group found in block."
21 | "22","Undefined feed rate","Feed rate has not yet been set or is undefined."
22 | "23","Invalid gcode ID:23","G-code command in block requires an integer value."
23 | "24","Invalid gcode ID:24","More than one g-code command that requires axis words found in block."
24 | "25","Invalid gcode ID:25","Repeated g-code word found in block."
25 | "26","Invalid gcode ID:26","No axis words found in block for g-code command or current modal state which requires them."
26 | "27","Invalid gcode ID:27","Line number value is invalid."
27 | "28","Invalid gcode ID:28","G-code command is missing a required value word."
28 | "29","Invalid gcode ID:29","G59.x work coordinate systems are not supported."
29 | "30","Invalid gcode ID:30","G53 only allowed with G0 and G1 motion modes."
30 | "31","Invalid gcode ID:31","Axis words found in block when no command or current modal state uses them."
31 | "32","Invalid gcode ID:32","G2 and G3 arcs require at least one in-plane axis word."
32 | "33","Invalid gcode ID:33","Motion command target is invalid."
33 | "34","Invalid gcode ID:34","Arc radius value is invalid."
34 | "35","Invalid gcode ID:35","G2 and G3 arcs require at least one in-plane offset word."
35 | "36","Invalid gcode ID:36","Unused value words found in block."
36 | "37","Invalid gcode ID:37","G43.1 dynamic tool length offset is not assigned to configured tool length axis."
37 | "38","Invalid gcode ID:38","Tool number greater than max supported value."
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/doc/log/commit_log_v0.9j.txt:
--------------------------------------------------------------------------------
1 | ----------------
2 | Date: 2015-08-14
3 | Author: Sonny Jeon
4 | Subject: Individual control pin invert compile-option.
5 |
6 | - Control pins may be individually inverted through a
7 | CONTROL_INVERT_MASK macro. This mask is define in the cpu_map.h file.
8 |
9 |
10 | ----------------
11 | Date: 2015-07-17
12 | Author: Sonny Jeon
13 | Subject: Version bump to v0.9j
14 |
15 | - Version bump requested by OEMs to easily determine whether the
16 | firmware supports the new EEPROM reset feature. Other than that, no
17 | significant changes.
18 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/doc/log/commit_log_v1.0c.txt:
--------------------------------------------------------------------------------
1 | ----------------
2 | Date: 2016-03-19
3 | Author: Sonny Jeon
4 | Subject: No variable spindle and spindle speed fix.
5 |
6 | - Soft limit errors were stuck in a feed hold without notifying the
7 | user why it was in a hold. When resumed, the soft limit error would
8 | kick in. Issue should be fixed to behave as intended to automatically
9 | hold and issue a soft limit alarm once the machine has come to a stop.
10 |
11 |
12 | ----------------
13 | Date: 2016-03-11
14 | Author: Sonny Jeon
15 | Subject: Soft limit error bug fix.
16 |
17 | - Soft limit errors were stuck in a feed hold without notifying the
18 | user why it was in a hold. When resumed, the soft limit error would
19 | kick in. Issue should be fixed to behave as intended. To automatically
20 | hold and issue a soft limit alarm once the machine has come to a stop.
21 |
22 |
23 | ----------------
24 | Date: 2016-03-04
25 | Author: Sonny Jeon
26 | Subject: Applied master branch bug fixes.
27 |
28 | - Planner was under-estimating maximum speeds through straight
29 | junctions in certain cases. The calculations have been updated to be
30 | more accurate.
31 |
32 | - Strange sizeof() bug in the most recent releases. Manifested as an
33 | alarm upon a power up even when homing was disabled. Fixed by declaring
34 | sizeof() with struct types, rather than variable names, even though
35 | they were validated to give the same value.
36 |
37 | - Spindle speed zero should disable the spindle. Now fixed.
38 |
39 | - New configuration option for inverting certain limit pins. Handy for
40 | mixed NO and NC switch machines. See config.h for details.
41 |
42 |
43 | ----------------
44 | Date: 2015-11-09
45 | Author: Sonny Jeon
46 | Subject: Pin state reporting of all pins. Flash optimization.
47 |
48 | - New pin state realtime reporting feature. Instead of `Lim:000` for
49 | limit state reports, the new feature shows `Pin:000|0|0000`, or
50 | something similar. The `|` delimited fields indicate xyz limits, probe,
51 | and control pin states, where 0 is always not triggered, and 1 is
52 | triggered. Invert masks ARE accounted for.
53 | Each field may be enabled or disabled via the `$10` status report
54 | setting. The probe and control pin flags are bits 5 and 6, respectively.
55 |
56 | - Remove the now deprecated `REPORT_CONTROL_PIN_STATE` option in
57 | config.h
58 |
59 | - The old limit pin reports `Lim:000` may be re-enabled by commenting
60 | out `REPORT_ALL_PIN_STATES` in config.h.
61 |
62 | - Incremented the version letter (v1.0c) to indicate the change in
63 | reporting style.
64 |
65 | - Replaced all bit_true_atomic and bit_false_atomic macros with
66 | function calls. This saved a couple hundred bytes of flash.
67 |
68 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/doc/script/simple_stream.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | """\
3 | Simple g-code streaming script for grbl
4 |
5 | Provided as an illustration of the basic communication interface
6 | for grbl. When grbl has finished parsing the g-code block, it will
7 | return an 'ok' or 'error' response. When the planner buffer is full,
8 | grbl will not send a response until the planner buffer clears space.
9 |
10 | G02/03 arcs are special exceptions, where they inject short line
11 | segments directly into the planner. So there may not be a response
12 | from grbl for the duration of the arc.
13 |
14 | ---------------------
15 | The MIT License (MIT)
16 |
17 | Copyright (c) 2012 Sungeun K. Jeon
18 |
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is
24 | furnished to do so, subject to the following conditions:
25 |
26 | The above copyright notice and this permission notice shall be included in
27 | all copies or substantial portions of the Software.
28 |
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 | ---------------------
37 | """
38 |
39 | import serial
40 | import time
41 |
42 | # Open grbl serial port
43 | s = serial.Serial('/dev/tty.usbmodem1811',115200)
44 |
45 | # Open g-code file
46 | f = open('grbl.gcode','r');
47 |
48 | # Wake up grbl
49 | s.write("\r\n\r\n")
50 | time.sleep(2) # Wait for grbl to initialize
51 | s.flushInput() # Flush startup text in serial input
52 |
53 | # Stream g-code to grbl
54 | for line in f:
55 | l = line.strip() # Strip all EOL characters for consistency
56 | print 'Sending: ' + l,
57 | s.write(l + '\n') # Send g-code block to grbl
58 | grbl_out = s.readline() # Wait for grbl response with carriage return
59 | print ' : ' + grbl_out.strip()
60 |
61 | # Wait here until grbl is finished to close serial port and file.
62 | raw_input(" Press to exit and disable grbl.")
63 |
64 | # Close file and serial port
65 | f.close()
66 | s.close()
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/coolant_control.h:
--------------------------------------------------------------------------------
1 | /*
2 | coolant_control.h - spindle control methods
3 | Part of Grbl
4 |
5 | Copyright (c) 2012-2016 Sungeun K. Jeon for Gnea Research LLC
6 |
7 | Grbl is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | Grbl is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Grbl. If not, see .
19 | */
20 |
21 | #ifndef coolant_control_h
22 | #define coolant_control_h
23 |
24 | #define COOLANT_NO_SYNC false
25 | #define COOLANT_FORCE_SYNC true
26 |
27 | #define COOLANT_STATE_DISABLE 0 // Must be zero
28 | #define COOLANT_STATE_FLOOD PL_COND_FLAG_COOLANT_FLOOD
29 | #define COOLANT_STATE_MIST PL_COND_FLAG_COOLANT_MIST
30 |
31 |
32 | // Initializes coolant control pins.
33 | void coolant_init(void);
34 |
35 | // Returns current coolant output state. Overrides may alter it from programmed state.
36 | uint8_t coolant_get_state(void);
37 |
38 | // Immediately disables coolant pins.
39 | void coolant_stop(void);
40 |
41 | // Sets the coolant pins according to state specified.
42 | void coolant_set_state(uint8_t mode);
43 |
44 | // G-code parser entry-point for setting coolant states. Checks for and executes additional conditions.
45 | void coolant_sync(uint8_t mode);
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/eeprom.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/cutcutgo.X/src/grbl/grbl/eeprom.c
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/eeprom.h:
--------------------------------------------------------------------------------
1 | /*
2 | eeprom.h - EEPROM methods
3 | Part of Grbl
4 |
5 | Copyright (c) 2009-2011 Simen Svale Skogsrud
6 |
7 | Grbl is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | Grbl is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Grbl. If not, see .
19 | */
20 |
21 | #ifndef eeprom_h
22 | #define eeprom_h
23 |
24 | unsigned char eeprom_get_char(unsigned int addr);
25 | void eeprom_put_char(unsigned int addr, unsigned char new_value);
26 | void memcpy_to_eeprom_with_checksum(unsigned int destination, char *source, unsigned int size);
27 | int memcpy_from_eeprom_with_checksum(char *destination, unsigned int source, unsigned int size);
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/examples/grblUpload/grblUpload.ino:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 | This sketch compiles and uploads Grbl to your 328p-based Arduino!
3 |
4 | To use:
5 | - First make sure you have imported Grbl source code into your Arduino
6 | IDE. There are details on our Github website on how to do this.
7 |
8 | - Select your Arduino Board and Serial Port in the Tools drop-down menu.
9 | NOTE: Grbl only officially supports 328p-based Arduinos, like the Uno.
10 | Using other boards will likely not work!
11 |
12 | - Then just click 'Upload'. That's it!
13 |
14 | For advanced users:
15 | If you'd like to see what else Grbl can do, there are some additional
16 | options for customization and features you can enable or disable.
17 | Navigate your file system to where the Arduino IDE has stored the Grbl
18 | source code files, open the 'config.h' file in your favorite text
19 | editor. Inside are dozens of feature descriptions and #defines. Simply
20 | comment or uncomment the #defines or alter their assigned values, save
21 | your changes, and then click 'Upload' here.
22 |
23 | Copyright (c) 2015 Sungeun K. Jeon
24 | Released under the MIT-license. See license.txt for details.
25 | ***********************************************************************/
26 |
27 | #include
28 |
29 | // Do not alter this file!
30 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/examples/grblUpload/license.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Sungeun K. Jeon
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
13 | all 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
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/examples/grblWrite_BuildInfo/license.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Sungeun K. Jeon for Gnea Research LLC
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
13 | all 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
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/jog.c:
--------------------------------------------------------------------------------
1 | /*
2 | jog.h - Jogging methods
3 | Part of Grbl
4 |
5 | Copyright (c) 2016 Sungeun K. Jeon for Gnea Research LLC
6 |
7 | Grbl is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | Grbl is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Grbl. If not, see .
19 | */
20 |
21 | #include "grbl.h"
22 |
23 |
24 | // Sets up valid jog motion received from g-code parser, checks for soft-limits, and executes the jog.
25 | uint8_t jog_execute(plan_line_data_t *pl_data, parser_block_t *gc_block)
26 | {
27 | // Initialize planner data struct for jogging motions.
28 | // NOTE: Spindle and coolant are allowed to fully function with overrides during a jog.
29 | pl_data->feed_rate = gc_block->values.f;
30 | pl_data->condition |= PL_COND_FLAG_NO_FEED_OVERRIDE;
31 | #ifdef USE_LINE_NUMBERS
32 | pl_data->line_number = gc_block->values.n;
33 | #endif
34 |
35 | if (bit_istrue(settings.flags,BITFLAG_SOFT_LIMIT_ENABLE)) {
36 | if (system_check_travel_limits(gc_block->values.xyz)) { return(STATUS_TRAVEL_EXCEEDED); }
37 | }
38 |
39 | // Valid jog command. Plan, set state, and execute.
40 | mc_line(gc_block->values.xyz,pl_data);
41 | if (sys.state == STATE_IDLE) {
42 | if (plan_get_current_block() != NULL) { // Check if there is a block to execute.
43 | sys.state = STATE_JOG;
44 | st_prep_buffer();
45 | st_wake_up(); // NOTE: Manual start. No state machine required.
46 | }
47 | }
48 |
49 | return(STATUS_OK);
50 | }
51 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/jog.h:
--------------------------------------------------------------------------------
1 | /*
2 | jog.h - Jogging methods
3 | Part of Grbl
4 |
5 | Copyright (c) 2016 Sungeun K. Jeon for Gnea Research LLC
6 |
7 | Grbl is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | Grbl is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Grbl. If not, see .
19 | */
20 |
21 | #ifndef jog_h
22 | #define jog_h
23 |
24 | #include "gcode.h"
25 |
26 | // System motion line numbers must be zero.
27 | #define JOG_LINE_NUMBER 0
28 |
29 | // Sets up valid jog motion received from g-code parser, checks for soft-limits, and executes the jog.
30 | uint8_t jog_execute(plan_line_data_t *pl_data, parser_block_t *gc_block);
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/limits.h:
--------------------------------------------------------------------------------
1 | /*
2 | limits.h - code pertaining to limit-switches and performing the homing cycle
3 | Part of Grbl
4 |
5 | Copyright (c) 2012-2016 Sungeun K. Jeon for Gnea Research LLC
6 | Copyright (c) 2009-2011 Simen Svale Skogsrud
7 |
8 | Grbl is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | Grbl is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with Grbl. If not, see .
20 | */
21 |
22 | #ifndef limits_h
23 | #define limits_h
24 |
25 |
26 | // Initialize the limits module
27 | void limits_init(void);
28 |
29 | // Disables hard limits.
30 | void limits_disable(void);
31 |
32 | // Returns limit state as a bit-wise uint8 variable.
33 | uint8_t limits_get_state(void);
34 |
35 | // Perform one portion of the homing cycle based on the input settings.
36 | void limits_go_home(uint8_t cycle_mask);
37 |
38 | // Check for soft limit violations
39 | void limits_soft_check(float *target);
40 |
41 | void limits_set_state(uint8_t axis, bool triggered);
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/motion_control.h:
--------------------------------------------------------------------------------
1 | /*
2 | motion_control.h - high level interface for issuing motion commands
3 | Part of Grbl
4 |
5 | Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC
6 | Copyright (c) 2009-2011 Simen Svale Skogsrud
7 |
8 | Grbl is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | Grbl is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with Grbl. If not, see .
20 | */
21 |
22 | #ifndef motion_control_h
23 | #define motion_control_h
24 |
25 |
26 | // System motion commands must have a line number of zero.
27 | #define HOMING_CYCLE_LINE_NUMBER 0
28 | #define PARKING_MOTION_LINE_NUMBER 0
29 |
30 | #define HOMING_CYCLE_ALL 0 // Must be zero.
31 | #define HOMING_CYCLE_X bit(X_AXIS)
32 | #define HOMING_CYCLE_Y bit(Y_AXIS)
33 | #define HOMING_CYCLE_Z bit(Z_AXIS)
34 |
35 |
36 | // Execute linear motion in absolute millimeter coordinates. Feed rate given in millimeters/second
37 | // unless invert_feed_rate is true. Then the feed_rate means that the motion should be completed in
38 | // (1 minute)/feed_rate time.
39 | void mc_line(float *target, plan_line_data_t *pl_data);
40 |
41 | // Execute an arc in offset mode format. position == current xyz, target == target xyz,
42 | // offset == offset from current xyz, axis_XXX defines circle plane in tool space, axis_linear is
43 | // the direction of helical travel, radius == circle radius, is_clockwise_arc boolean. Used
44 | // for vector transformation direction.
45 | void mc_arc(float *target, plan_line_data_t *pl_data, float *position, float *offset, float radius,
46 | uint8_t axis_0, uint8_t axis_1, uint8_t axis_linear, uint8_t is_clockwise_arc);
47 |
48 | // Dwell for a specific number of seconds
49 | void mc_dwell(float seconds);
50 |
51 | // Perform homing cycle to locate machine zero. Requires limit switches.
52 | void mc_homing_cycle(uint8_t cycle_mask);
53 |
54 | // Perform tool length probe cycle. Requires probe switch.
55 | uint8_t mc_probe_cycle(float *target, plan_line_data_t *pl_data, uint8_t parser_flags);
56 |
57 | // Handles updating the override control state.
58 | void mc_override_ctrl_update(uint8_t override_state);
59 |
60 | // Plans and executes the single special motion case for parking. Independent of main planner buffer.
61 | void mc_parking_motion(float *parking_target, plan_line_data_t *pl_data);
62 |
63 | // Load/unload the mat.
64 | void mc_mat_load_unload(void);
65 |
66 | // Move tool head to the center.
67 | void mc_head_center(void);
68 |
69 | // Performs system reset. If in motion state, kills all motion and sets system alarm.
70 | void mc_reset(void);
71 |
72 | #endif
73 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/nuts_bolts.h:
--------------------------------------------------------------------------------
1 | /*
2 | nuts_bolts.h - Header file for shared definitions, variables, and functions
3 | Part of Grbl
4 |
5 | Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC
6 | Copyright (c) 2009-2011 Simen Svale Skogsrud
7 |
8 | Grbl is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | Grbl is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with Grbl. If not, see .
20 | */
21 |
22 | #ifndef nuts_bolts_h
23 | #define nuts_bolts_h
24 |
25 | #define F_CPU 16000000 /* AVR, just to avoid nasty error messages. */
26 |
27 | #define false 0
28 | #define true 1
29 |
30 | #define SOME_LARGE_VALUE 1.0E+38
31 |
32 | // Axis array index values. Must start with 0 and be continuous.
33 | #define N_AXIS 3 // Number of axes
34 | #define X_AXIS 0 // Axis indexing value.
35 | #define Y_AXIS 1
36 | #define Z_AXIS 2
37 | // #define A_AXIS 3
38 |
39 | // CoreXY motor assignments. DO NOT ALTER.
40 | // NOTE: If the A and B motor axis bindings are changed, this effects the CoreXY equations.
41 | #ifdef COREXY
42 | #define A_MOTOR X_AXIS // Must be X_AXIS
43 | #define B_MOTOR Y_AXIS // Must be Y_AXIS
44 | #endif
45 |
46 | // Conversions
47 | #define MM_PER_INCH (25.40)
48 | #define INCH_PER_MM (0.0393701)
49 | #define TICKS_PER_MICROSECOND (F_CPU/1000000)
50 |
51 | #define DELAY_MODE_DWELL 0
52 | #define DELAY_MODE_SYS_SUSPEND 1
53 |
54 | // Useful macros
55 | #define clear_vector(a) memset(a, 0, sizeof(a))
56 | #define clear_vector_float(a) memset(a, 0.0, sizeof(float)*N_AXIS)
57 | // #define clear_vector_long(a) memset(a, 0.0, sizeof(long)*N_AXIS)
58 | #define max(a,b) (((a) > (b)) ? (a) : (b))
59 | #define min(a,b) (((a) < (b)) ? (a) : (b))
60 | #define isequal_position_vector(a,b) !(memcmp(a, b, sizeof(float)*N_AXIS))
61 |
62 | // Bit field and masking macros
63 | #define bit(n) (1 << n)
64 | #define bit_true(x,mask) (x) |= (mask)
65 | #define bit_false(x,mask) (x) &= ~(mask)
66 | #define bit_istrue(x,mask) ((x & mask) != 0)
67 | #define bit_isfalse(x,mask) ((x & mask) == 0)
68 |
69 | // Read a floating point value from a string. Line points to the input buffer, char_counter
70 | // is the indexer pointing to the current character of the line, while float_ptr is
71 | // a pointer to the result variable. Returns true when it succeeds
72 | uint8_t read_float(char *line, uint8_t *char_counter, float *float_ptr);
73 |
74 | // Non-blocking delay function used for general operation and suspend features.
75 | void delay_sec(float seconds, uint8_t mode);
76 |
77 | // Delays variable-defined milliseconds. Compiler compatibility fix for _delay_ms().
78 | void delay_ms(uint16_t ms);
79 |
80 | // Delays variable-defined microseconds. Compiler compatibility fix for _delay_us().
81 | void delay_us(uint32_t us);
82 |
83 | // Computes hypotenuse, avoiding avr-gcc's bloated version and the extra error checking.
84 | float hypot_f(float x, float y);
85 |
86 | float convert_delta_vector_to_unit_vector(float *vector);
87 | float limit_value_by_axis_maximum(float *max_value, float *unit_vec);
88 |
89 | #endif
90 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/print.h:
--------------------------------------------------------------------------------
1 | /*
2 | print.h - Functions for formatting output strings
3 | Part of Grbl
4 |
5 | Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC
6 | Copyright (c) 2009-2011 Simen Svale Skogsrud
7 |
8 | Grbl is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | Grbl is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with Grbl. If not, see .
20 | */
21 |
22 | #ifndef print_h
23 | #define print_h
24 |
25 |
26 | void printString(const char *s);
27 |
28 | void printPgmString(const char *s);
29 |
30 | void printInteger(long n);
31 |
32 | void print_uint32_base10(uint32_t n);
33 |
34 | // Prints an uint8 variable in base 10.
35 | void print_uint8_base10(uint8_t n);
36 |
37 | // Prints an uint8 variable in base 2 with desired number of desired digits.
38 | void print_uint8_base2_ndigit(uint8_t n, uint8_t digits);
39 |
40 | void printFloat(float n, uint8_t decimal_places);
41 |
42 | // Floating value printing handlers for special variables types used in Grbl.
43 | // - CoordValue: Handles all position or coordinate values in inches or mm reporting.
44 | // - RateValue: Handles feed rate and current velocity in inches or mm reporting.
45 | void printFloat_CoordValue(float n);
46 | void printFloat_RateValue(float n);
47 |
48 | // Debug tool to print free memory in bytes at the called point. Not used otherwise.
49 | void printFreeMemory(void);
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/probe.c:
--------------------------------------------------------------------------------
1 | /*
2 | probe.c - code pertaining to probing methods
3 | Part of Grbl
4 |
5 | Copyright (c) 2014-2016 Sungeun K. Jeon for Gnea Research LLC
6 |
7 | Grbl is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | Grbl is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Grbl. If not, see .
19 | */
20 |
21 | #include "grbl.h"
22 |
23 |
24 | // Inverts the probe pin state depending on user settings and probing cycle mode.
25 | uint8_t probe_invert_mask;
26 |
27 |
28 | // Probe pin initialization routine.
29 | void probe_init()
30 | {
31 | #if 0 /* AVR */
32 | PROBE_DDR &= ~(PROBE_MASK); // Configure as input pins
33 | #ifdef DISABLE_PROBE_PIN_PULL_UP
34 | PROBE_PORT &= ~(PROBE_MASK); // Normal low operation. Requires external pull-down.
35 | #else
36 | PROBE_PORT |= PROBE_MASK; // Enable internal pull-up resistors. Normal high operation.
37 | #endif
38 | probe_configure_invert_mask(false); // Initialize invert mask.
39 | #endif /* AVR */
40 | }
41 |
42 |
43 | // Called by probe_init() and the mc_probe() routines. Sets up the probe pin invert mask to
44 | // appropriately set the pin logic according to setting for normal-high/normal-low operation
45 | // and the probing cycle modes for toward-workpiece/away-from-workpiece.
46 | void probe_configure_invert_mask(uint8_t is_probe_away)
47 | {
48 | probe_invert_mask = 0; // Initialize as zero.
49 | if (bit_isfalse(settings.flags,BITFLAG_INVERT_PROBE_PIN)) { probe_invert_mask ^= PROBE_MASK; }
50 | if (is_probe_away) { probe_invert_mask ^= PROBE_MASK; }
51 | }
52 |
53 |
54 | // Returns the probe pin state. Triggered = true. Called by gcode parser and probe state monitor.
55 | uint8_t probe_get_state() { return((PROBE_PIN & PROBE_MASK) ^ probe_invert_mask); }
56 |
57 |
58 | // Monitors probe pin state and records the system position when detected. Called by the
59 | // stepper ISR per ISR tick.
60 | // NOTE: This function must be extremely efficient as to not bog down the stepper ISR.
61 | void probe_state_monitor()
62 | {
63 | if (probe_get_state()) {
64 | sys_probe_state = PROBE_OFF;
65 | memcpy(sys_probe_position, sys_position, sizeof(sys_position));
66 | bit_true(sys_rt_exec_state, EXEC_MOTION_CANCEL);
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/probe.h:
--------------------------------------------------------------------------------
1 | /*
2 | probe.h - code pertaining to probing methods
3 | Part of Grbl
4 |
5 | Copyright (c) 2014-2016 Sungeun K. Jeon for Gnea Research LLC
6 |
7 | Grbl is free software: you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation, either version 3 of the License, or
10 | (at your option) any later version.
11 |
12 | Grbl is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with Grbl. If not, see .
19 | */
20 |
21 | #ifndef probe_h
22 | #define probe_h
23 |
24 | // Values that define the probing state machine.
25 | #define PROBE_OFF 0 // Probing disabled or not in use. (Must be zero.)
26 | #define PROBE_ACTIVE 1 // Actively watching the input pin.
27 |
28 | // Probe pin initialization routine.
29 | void probe_init(void);
30 |
31 | // Called by probe_init() and the mc_probe() routines. Sets up the probe pin invert mask to
32 | // appropriately set the pin logic according to setting for normal-high/normal-low operation
33 | // and the probing cycle modes for toward-workpiece/away-from-workpiece.
34 | void probe_configure_invert_mask(uint8_t is_probe_away);
35 |
36 | // Returns probe pin state. Triggered = true. Called by gcode parser and probe state monitor.
37 | uint8_t probe_get_state(void);
38 |
39 | // Monitors probe pin state and records the system position when detected. Called by the
40 | // stepper ISR per ISR tick.
41 | void probe_state_monitor(void);
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/protocol.h:
--------------------------------------------------------------------------------
1 | /*
2 | protocol.h - controls Grbl execution protocol and procedures
3 | Part of Grbl
4 |
5 | Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC
6 | Copyright (c) 2009-2011 Simen Svale Skogsrud
7 |
8 | Grbl is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | Grbl is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with Grbl. If not, see .
20 | */
21 |
22 | #ifndef protocol_h
23 | #define protocol_h
24 |
25 | // Line buffer size from the serial input stream to be executed.
26 | // NOTE: Not a problem except for extreme cases, but the line buffer size can be too small
27 | // and g-code blocks can get truncated. Officially, the g-code standards support up to 256
28 | // characters. In future versions, this will be increased, when we know how much extra
29 | // memory space we can invest into here or we re-write the g-code parser not to have this
30 | // buffer.
31 | #ifndef LINE_BUFFER_SIZE
32 | #define LINE_BUFFER_SIZE 80
33 | #endif
34 |
35 | // Starts Grbl main loop. It handles all incoming characters from the serial port and executes
36 | // them as they complete. It is also responsible for finishing the initialization procedures.
37 | void protocol_main_loop(void);
38 |
39 | // Checks and executes a realtime command at various stop points in main program
40 | void protocol_execute_realtime(void);
41 | void protocol_exec_rt_system(void);
42 |
43 | // Executes the auto cycle feature, if enabled.
44 | void protocol_auto_cycle_start(void);
45 |
46 | // Block until all buffered steps are executed
47 | void protocol_buffer_synchronize(void);
48 |
49 |
50 | void protocol_handler(void);
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/serial.h:
--------------------------------------------------------------------------------
1 | /*
2 | serial.c - Low level functions for sending and recieving bytes via the serial port
3 | Part of Grbl
4 |
5 | Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC
6 | Copyright (c) 2009-2011 Simen Svale Skogsrud
7 |
8 | Grbl is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | Grbl is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with Grbl. If not, see .
20 | */
21 |
22 | #ifndef serial_h
23 | #define serial_h
24 |
25 | #include "config/cutcutgo/osal/osal.h"
26 |
27 |
28 | #ifndef RX_BUFFER_SIZE
29 | #define RX_BUFFER_SIZE 128
30 | #endif
31 | #ifndef TX_BUFFER_SIZE
32 | #ifdef USE_LINE_NUMBERS
33 | #define TX_BUFFER_SIZE 112
34 | #else
35 | #define TX_BUFFER_SIZE 104
36 | #endif
37 | #endif
38 |
39 | #define SERIAL_NO_DATA 0xff
40 |
41 |
42 | void serial_init(void);
43 |
44 | // Writes one byte to the TX serial buffer. Called by main program.
45 | void serial_write(uint8_t data);
46 |
47 | // Fetches the first byte in the serial read buffer. Called by main program.
48 | uint8_t serial_read(void);
49 |
50 | // Reset and empty data in read buffer. Used by e-stop and reset.
51 | void serial_reset_read_buffer(void);
52 |
53 | // Returns the number of bytes available in the RX serial buffer.
54 | uint32_t serial_get_rx_buffer_available(void);
55 |
56 | // Returns the number of bytes used in the RX serial buffer.
57 | // NOTE: Deprecated. Not used unless classic status reports are enabled in config.h.
58 | uint32_t serial_get_rx_buffer_count(void);
59 |
60 | // Returns the number of bytes used in the TX serial buffer.
61 | // NOTE: Not used except for debugging and ensuring no TX bottlenecks.
62 | uint32_t serial_get_tx_buffer_count(void);
63 |
64 | // Extract pending bytes from the TX serial buffer and copy them into
65 | // a given buffer.
66 | int serial_copy_pending_tx(uint8_t *p_buffer, int size);
67 |
68 | int serial_on_receive(uint8_t *p_buffer, int size);
69 |
70 |
71 | #endif
72 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/spindle_control.h:
--------------------------------------------------------------------------------
1 | /*
2 | spindle_control.h - spindle control methods
3 | Part of Grbl
4 |
5 | Copyright (c) 2012-2016 Sungeun K. Jeon for Gnea Research LLC
6 | Copyright (c) 2009-2011 Simen Svale Skogsrud
7 |
8 | Grbl is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | Grbl is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with Grbl. If not, see .
20 | */
21 |
22 | #ifndef spindle_control_h
23 | #define spindle_control_h
24 |
25 | #define SPINDLE_NO_SYNC false
26 | #define SPINDLE_FORCE_SYNC true
27 |
28 | #define SPINDLE_STATE_DISABLE 0 // Must be zero.
29 | #define SPINDLE_STATE_CW bit(0)
30 | #define SPINDLE_STATE_CCW bit(1)
31 |
32 |
33 | // Initializes spindle pins and hardware PWM, if enabled.
34 | void spindle_init(void);
35 |
36 | // Returns current spindle output state. Overrides may alter it from programmed states.
37 | uint8_t spindle_get_state(void);
38 |
39 | // Called by g-code parser when setting spindle state and requires a buffer sync.
40 | // Immediately sets spindle running state with direction and spindle rpm via PWM, if enabled.
41 | // Called by spindle_sync() after sync and parking motion/spindle stop override during restore.
42 | #ifdef VARIABLE_SPINDLE
43 |
44 | // Called by g-code parser when setting spindle state and requires a buffer sync.
45 | void spindle_sync(uint8_t state, float rpm);
46 |
47 | // Sets spindle running state with direction, enable, and spindle PWM.
48 | void spindle_set_state(uint8_t state, float rpm);
49 |
50 | // Sets spindle PWM quickly for stepper ISR. Also called by spindle_set_state().
51 | // NOTE: 328p PWM register is 8-bit.
52 | void spindle_set_speed(uint8_t pwm_value);
53 |
54 | // Computes 328p-specific PWM register value for the given RPM for quick updating.
55 | uint8_t spindle_compute_pwm_value(float rpm);
56 |
57 | #else
58 |
59 | // Called by g-code parser when setting spindle state and requires a buffer sync.
60 | #define spindle_sync(state, rpm) _spindle_sync(state)
61 | void _spindle_sync(uint8_t state);
62 |
63 | // Sets spindle running state with direction and enable.
64 | #define spindle_set_state(state, rpm) _spindle_set_state(state)
65 | void _spindle_set_state(uint8_t state);
66 |
67 | #endif
68 |
69 | // Stop and start spindle routines. Called by all spindle routines and stepper ISR.
70 | void spindle_stop(void);
71 |
72 |
73 | #endif
74 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/stepper.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/cutcutgo.X/src/grbl/grbl/stepper.c
--------------------------------------------------------------------------------
/cutcutgo.X/src/grbl/grbl/stepper.h:
--------------------------------------------------------------------------------
1 | /*
2 | stepper.h - stepper motor driver: executes motion plans of planner.c using the stepper motors
3 | Part of Grbl
4 |
5 | Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC
6 | Copyright (c) 2009-2011 Simen Svale Skogsrud
7 |
8 | Grbl is free software: you can redistribute it and/or modify
9 | it under the terms of the GNU General Public License as published by
10 | the Free Software Foundation, either version 3 of the License, or
11 | (at your option) any later version.
12 |
13 | Grbl is distributed in the hope that it will be useful,
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | GNU General Public License for more details.
17 |
18 | You should have received a copy of the GNU General Public License
19 | along with Grbl. If not, see .
20 | */
21 |
22 | #ifndef stepper_h
23 | #define stepper_h
24 |
25 | #include "hal/motor.h"
26 | #include "hal/timer.h"
27 |
28 | #ifndef SEGMENT_BUFFER_SIZE
29 | #define SEGMENT_BUFFER_SIZE 6
30 | #endif
31 |
32 | #define STEPPER_FEEDRATE_MIN (1500.0)
33 | #define STEPPER_FEEDRATE_MAX (5000.0)
34 |
35 | // Initialize and setup the stepper motor subsystem
36 | void stepper_init(void);
37 | void stepper_deinit(void);
38 |
39 | // Enable steppers, but cycle does not start unless called by motion control or realtime command.
40 | void st_wake_up(void);
41 |
42 | // Immediately disables steppers
43 | void st_go_idle(void);
44 |
45 | // Generate the step and direction port invert masks.
46 | void st_generate_step_dir_invert_masks(void);
47 |
48 | // Reset the stepper subsystem variables
49 | void st_reset(void);
50 |
51 | // Changes the run state of the step segment buffer to execute the special parking motion.
52 | void st_parking_setup_buffer(void);
53 |
54 | // Restores the step segment buffer to the normal run state after a parking motion.
55 | void st_parking_restore_buffer(void);
56 |
57 | // Reloads step segment buffer. Called continuously by realtime execution system.
58 | void st_prep_buffer(void);
59 |
60 | // Called by planner_recalculate() when the executing block is updated by the new plan.
61 | void st_update_plan_block_parameters(void);
62 |
63 | // Called by realtime status reporting if realtime rate reporting is enabled in config.h.
64 | float st_get_realtime_rate(void);
65 |
66 | // Called by our motor HAL.
67 | void st_execute_next_step(void);
68 | void st_plan_next_move(void);
69 |
70 | // Tool selection
71 | void st_select_tool(uint8_t tool);
72 |
73 | #endif
74 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/hal/button.c:
--------------------------------------------------------------------------------
1 | #include "hal/button.h"
2 | #include "grbl/grbl/grbl.h"
3 |
4 | int a;
5 |
6 | void button_init(void)
7 | {
8 | /* Initialize buttons GPIOs */
9 | ANSELBbits.ANSB12 = 0;
10 | ANSELBbits.ANSB13 = 0;
11 |
12 | GPIO_PinInputEnable(BTN_PAUSE);
13 | GPIO_PinInputEnable(BTN_LOGO);
14 | GPIO_PinInputEnable(BTN_POWER);
15 | GPIO_PinInputEnable(BTN_UPDOWN);
16 |
17 | /* Disable pull-ups. */
18 | CNPUB &= ~((1 << (BTN_PAUSE & 0x0F)) | (1 << (BTN_LOGO & 0x0F)));
19 | CNENB |= (1 << (BTN_PAUSE & 0x0F)) | (1 << (BTN_LOGO & 0x0F));
20 |
21 | CNPUD &= ~(1 << (BTN_UPDOWN & 0x0F));
22 | CNEND |= (1 << (BTN_UPDOWN & 0x0F));
23 |
24 | CNPUF &= ~(1 << (BTN_POWER & 0x0F));
25 | CNENF |= (1 << (BTN_POWER & 0x0F));
26 |
27 | /* Set Change Notification priority to 1. */
28 | IPC8bits.CNIP = 1;
29 |
30 | /* Enable change notification on port B. */
31 | IEC1bits.CNBIE = 1;
32 | IFS1bits.CNBIF = 0;
33 | CNCONBbits.ON = 1;
34 |
35 | /* Enable change notification on port D. */
36 | IEC1bits.CNDIE = 1;
37 | IFS1bits.CNDIF = 0;
38 | CNCONDbits.ON = 1;
39 |
40 | /* Enable change notification on port F. */
41 | IEC1bits.CNFIE = 1;
42 | IFS1bits.CNFIF = 0;
43 | CNCONFbits.ON = 1;
44 | }
45 |
46 | void hal_button_pressed(void)
47 | {
48 | volatile uint32_t portb = PORTB;
49 | //volatile uint32_t portd = PORTD;
50 | volatile uint32_t portf = PORTF;
51 |
52 | /* Is pause button pressed ? */
53 | if (portb & (1 << (BTN_PAUSE & 0x0F)))
54 | {
55 | /* Pause current cycle. */
56 |
57 | }
58 |
59 | /* Is logo button pressed ? */
60 | if (portb & (1 << (BTN_LOGO & 0x0F)))
61 | {
62 | /* Logo button pressed. */
63 | }
64 |
65 | /* Is updown button pressed ? */
66 | if ((PORTD & (1 << (BTN_UPDOWN & 0x0F))) == 0)
67 | {
68 | /* Updown button pressed. */
69 | if (sys.state == STATE_IDLE)
70 | {
71 | system_set_exec_state_flag(EXEC_MAT_LOAD_UNLOAD);
72 | }
73 | }
74 |
75 | /* Is power button pressed ? */
76 | if (portf & (1 << (BTN_POWER & 0x0F)))
77 | {
78 | /* Power button pressed. */
79 | //system_execute_line((char *)"$H");
80 | //mc_homing_cycle((1 << X_AXIS));
81 | }
82 | }
83 |
84 | bool is_power_button_pressed(void)
85 | {
86 | volatile uint32_t portf = PORTF;
87 |
88 | /* Is pause button pressed ? */
89 | return ((portf & (1 << (BTN_POWER & 0x0F))) == 0);
90 | }
--------------------------------------------------------------------------------
/cutcutgo.X/src/hal/button.h:
--------------------------------------------------------------------------------
1 | /*
2 | * File: button.h
3 | * Author: virtualabs
4 | *
5 | * Created on 5 juillet 2023, 00:11
6 | */
7 |
8 | #ifndef __INC_BUTTON_H
9 | #define __INC_BUTTON_H
10 |
11 | #include "configuration.h"
12 | #include "definitions.h"
13 |
14 | #define BTN_PAUSE GPIO_PIN_RB12
15 | #define BTN_LOGO GPIO_PIN_RB13
16 | #define BTN_POWER GPIO_PIN_RF3
17 | #define BTN_UPDOWN GPIO_PIN_RD13
18 |
19 | #define BTN_IFS1_MASK ((1 << 13) | (1 << 15) | (1 << 17))
20 |
21 | void button_init(void);
22 | void hal_button_pressed(void);
23 | bool is_power_button_pressed(void);
24 |
25 | #endif /* __INC_BUTTON_H */
26 |
27 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/hal/config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Hardware Abstraction Layer configuration
3 | *
4 | * Tool #1:
5 | *
6 | * - Reduction ratio: 11/48
7 | * - displacement/step: ((11/48) * 5.5mm) / STEPS_PER_REV = 0.007 mm
8 | *
9 | * Tool #2:
10 | *
11 | * - Reduction ratio: (11 * 11) / (42 * 48) = 121/2016
12 | * - displacement/step: ((11/48 * 11/42) * 5.5mm) / STEPS_PER_REV = 0.0017 mm
13 | *
14 | * X axis:
15 | *
16 | * - Reduction ratio: 11/66 = 1/6
17 | * - displacement/step: (PI * 6mm) /(6 * STEPS_PER_REV) = 0.01mm
18 | *
19 | * Y axis:
20 | *
21 | * - Reduction ratio: 121/3780
22 | * - displacement/step: (PI * 15.5mm * 121) / (3780 * STEPS_PER_REV) = 0.008 mm
23 | *
24 | **/
25 |
26 | #ifndef __INC_HAL_CONFIG_H
27 | #define __INC_HAL_CONFIG_H
28 |
29 | #include
30 | #include "config/cutcutgo/peripheral/gpio/plib_gpio.h"
31 |
32 | #define SYS_FREQ 96000000
33 |
34 | #define MOTOR_X_DRIVER_IN1 GPIO_PIN_RD0
35 | #define MOTOR_X_DRIVER_PWM_IN2 RPD0R
36 | #define MOTOR_X_DRIVER_IN2 GPIO_PIN_RD1
37 | #define MOTOR_X_DRIVER_PWM_IN1 RPD1R
38 | #define MOTOR_X_OCM 2
39 | #define MOTOR_X_DRIVER_ENC_A GPIO_PIN_RG0
40 | #define MOTOR_X_DRIVER_ENC_B GPIO_PIN_RG1
41 |
42 | #define MOTOR_Y_DRIVER_IN1 GPIO_PIN_RD2
43 | #define MOTOR_Y_DRIVER_PWM_IN1 RPD2R
44 | #define MOTOR_Y_DRIVER_IN2 GPIO_PIN_RF1
45 | #define MOTOR_Y_DRIVER_PWM_IN2 RPF1R
46 | #define MOTOR_Y_DRIVER_ENC_A GPIO_PIN_RG6
47 | #define MOTOR_Y_DRIVER_ENC_B GPIO_PIN_RG7
48 | #define MOTOR_Y_OCM 3
49 |
50 | #define MOTOR_TOOL2_DRIVER_IN1 GPIO_PIN_RB6
51 | #define MOTOR_TOOL2_DRIVER_PWM_IN1 RPB6R
52 | #define MOTOR_TOOL2_DRIVER_IN2 GPIO_PIN_RD5
53 | #define MOTOR_TOOL2_DRIVER_PWM_IN2 RPD5R
54 | #define MOTOR_TOOL2_DRIVER_ENC_A GPIO_PIN_RG14
55 | #define MOTOR_TOOL2_DRIVER_ENC_B GPIO_PIN_RG15
56 | #define MOTOR_TOOL2_OCM 2
57 |
58 |
59 | #define MOTOR_TOOL1_DRIVER_IN1 GPIO_PIN_RF12
60 | #define MOTOR_TOOL1_DRIVER_PWM_IN1 RPF12R
61 | #define MOTOR_TOOL1_DRIVER_IN2 GPIO_PIN_RF8
62 | #define MOTOR_TOOL1_DRIVER_PWM_IN2 RPF8R
63 | #define MOTOR_TOOL1_DRIVER_ENC_A GPIO_PIN_RG12
64 | #define MOTOR_TOOL1_DRIVER_ENC_B GPIO_PIN_RG13
65 | #define MOTOR_TOOL1_OCM 5
66 |
67 | #define MOTOR_ACCESSORY_DRIVER_IN1 GPIO_PIN_RD3
68 | #define MOTOR_ACCESSORY_DRIVER_PWM_IN1 RPD3R
69 | #define MOTOR_ACCESSORY_DRIVER_IN2 GPIO_PIN_RD11
70 | #define MOTOR_ACCESSORY_DRIVER_PWM_IN2 RPD11R
71 | #define MOTOR_ACCESSORY_DRIVER_ENC_A GPIO_PIN_RG8
72 | #define MOTOR_ACCESSORY_DRIVER_ENC_B GPIO_PIN_RG9
73 | #define MOTOR_ACCESSORY_OCM 4
74 |
75 |
76 | #endif /* __INC_HAL_CONFIG_H */
--------------------------------------------------------------------------------
/cutcutgo.X/src/hal/led.h:
--------------------------------------------------------------------------------
1 | #ifndef __INC_LED_H
2 | #define __INC_LED_H
3 |
4 | #include "configuration.h"
5 | #include "definitions.h"
6 |
7 | #define GPIO_LED_LOGO GPIO_PIN_RB11
8 | #define GPIO_LED_PAUSE GPIO_PIN_RB10
9 | #define GPIO_LED_UPDOWN GPIO_PIN_RF13
10 | #define GPIO_LED_PWR_WHITE GPIO_PIN_RF4
11 | #define GPIO_LED_PWR_RED GPIO_PIN_RF5
12 | #define GPIO_LED_PWR_BLUE GPIO_PIN_RE4
13 |
14 | #define LED_BLINK_PERIOD (250) /* Blink period: 500ms */
15 |
16 | enum {
17 | LED_LOGO = 0,
18 | LED_PAUSE,
19 | LED_UPDOWN,
20 | LED_POWER_WHITE,
21 | LED_POWER_RED,
22 | LED_POWER_BLUE,
23 | LED_MAX_ID
24 | };
25 |
26 | void led_init(void);
27 | void led_normal_mode(int led_id);
28 | void led_blink_mode(int led_id);
29 | void led_toggle(int led_id);
30 | void led_clear(int led_id);
31 | void led_set(int led_id);
32 | void led_handle_blink(void);
33 | void led_set_logo(bool enable);
34 | void led_set_pause(bool enable);
35 | void led_set_power(bool blue, bool white, bool red);
36 | void led_set_updown(bool enable);
37 |
38 |
39 | #endif /* __INC_LED_H */
--------------------------------------------------------------------------------
/cutcutgo.X/src/hal/motor.c:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/cutcutgo.X/src/hal/motor.c
--------------------------------------------------------------------------------
/cutcutgo.X/src/hal/timer.h:
--------------------------------------------------------------------------------
1 | /**
2 | * System timers module
3 | */
4 |
5 | #ifndef __INC_HAL_TIMER_H
6 | #define __INC_HAL_TIMER_H
7 |
8 | #include
9 |
10 | #define TIMER_POOL_SIZE 10
11 |
12 | typedef void (timerslot_cb_t)(void *p_data);
13 |
14 | typedef enum {
15 | TIMER_FREE,
16 | TIMER_STOPPED,
17 | TIMER_RUNNING
18 | } timerslot_state_t;
19 |
20 | typedef struct {
21 | uint32_t interval;
22 | uint32_t stop_ts;
23 | void *p_data;
24 | timerslot_cb_t *p_callback;
25 | timerslot_state_t state;
26 | } timerslot_t;
27 |
28 | /* Initialize system timers. */
29 | void timer_init(void);
30 | void timer_start(void);
31 | uint32_t timer_get_ms(void);
32 | void _delay_ms(uint32_t ms);
33 |
34 | /* Timer creation, start, stop, destruction. */
35 | int timer_create_timer(uint32_t interval_ms, timerslot_cb_t *p_callback, void *p_data);
36 | int timer_set_interval(int timer_id, uint32_t interval);
37 | int timer_start_timer(int timer_id);
38 | int timer_stop_timer(int timer_id);
39 | int timer_destroy_timer(int timer_id);
40 |
41 |
42 | #endif /* __INC_HAL_TIMER_H */
--------------------------------------------------------------------------------
/cutcutgo.X/src/hal/watchdog.c:
--------------------------------------------------------------------------------
1 | #include "hal/watchdog.h"
2 |
3 | /**
4 | * Watchdog callback function.
5 | *
6 | * Called every 1 ms.
7 | */
8 |
9 | void watchdog_callback(void)
10 | {
11 | /* Check if motors are stalled. */
12 | hal_motor_safety_checks();
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/hal/watchdog.h:
--------------------------------------------------------------------------------
1 | /*
2 | * File: watchdog.h
3 | * Author: virtualabs
4 | *
5 | * Created on 1 juin 2023, 21:47
6 | */
7 |
8 | #ifndef __INC_WATCHDOG_H
9 | #define __INC_WATCHDOG_H
10 |
11 | #include "hal/motor.h"
12 |
13 | void watchdog_callback(void);
14 |
15 |
16 | #endif /* __INC_WATCHDOG_H */
17 |
18 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/main.c:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries.
3 | *
4 | * Subject to your compliance with these terms, you may use Microchip software
5 | * and any derivatives exclusively with Microchip products. It is your
6 | * responsibility to comply with third party license terms applicable to your
7 | * use of third party software (including open source software) that may
8 | * accompany Microchip software.
9 | *
10 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
11 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
12 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
13 | * PARTICULAR PURPOSE.
14 | *
15 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
16 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
17 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
18 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
19 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
20 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
21 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
22 | *******************************************************************************/
23 |
24 | /*******************************************************************************
25 | Main Source File
26 |
27 | Company:
28 | Microchip Technology Inc.
29 |
30 | File Name:
31 | main.c
32 |
33 | Summary:
34 | This file contains the "main" function for a project.
35 |
36 | Description:
37 | This file contains the "main" function for a project. The
38 | "main" function calls the "SYS_Initialize" function to initialize the state
39 | machines of all modules in the system
40 | *******************************************************************************/
41 |
42 | // *****************************************************************************
43 | // *****************************************************************************
44 | // Section: Included Files
45 | // *****************************************************************************
46 | // *****************************************************************************
47 |
48 | #include // Defines NULL
49 | #include // Defines true
50 | #include // Defines EXIT_FAILURE
51 | #include "definitions.h" // SYS function prototypes
52 |
53 |
54 | // *****************************************************************************
55 | // *****************************************************************************
56 | // Section: Main Entry Point
57 | // *****************************************************************************
58 | // *****************************************************************************
59 |
60 | int main ( void )
61 | {
62 | /* Initialize all modules */
63 | SYS_Initialize ( NULL );
64 |
65 | while ( true )
66 | {
67 | /* Maintain state machines of all polled MPLAB Harmony modules. */
68 | SYS_Tasks ( );
69 | }
70 |
71 | /* Execution should not come here during normal operation */
72 |
73 | return ( EXIT_FAILURE );
74 | }
75 |
76 |
77 | /*******************************************************************************
78 | End of File
79 | */
80 |
81 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/packs/PIC32MK1024GPE100_DFP/device.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | Device Header File
3 |
4 | Company:
5 | Microchip Technology Inc.
6 |
7 | File Name:
8 | device.h
9 |
10 | Summary:
11 | This file includes the selected device from within the project.
12 | The device will provide access to respective device packs.
13 |
14 | Description:
15 | None
16 |
17 | *******************************************************************************/
18 |
19 | // DOM-IGNORE-BEGIN
20 | /*******************************************************************************
21 | * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
22 | *
23 | * Subject to your compliance with these terms, you may use Microchip software
24 | * and any derivatives exclusively with Microchip products. It is your
25 | * responsibility to comply with third party license terms applicable to your
26 | * use of third party software (including open source software) that may
27 | * accompany Microchip software.
28 | *
29 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
30 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
31 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
32 | * PARTICULAR PURPOSE.
33 | *
34 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
35 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
36 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
37 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
38 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
39 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
40 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
41 | *******************************************************************************/
42 | // DOM-IGNORE-END
43 |
44 | #include
45 | #include
46 | #include "toolchain_specifics.h"
47 |
48 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/packs/PIC32MX470F512H_DFP/device.h:
--------------------------------------------------------------------------------
1 | /*******************************************************************************
2 | Device Header File
3 |
4 | Company:
5 | Microchip Technology Inc.
6 |
7 | File Name:
8 | device.h
9 |
10 | Summary:
11 | This file includes the selected device from within the project.
12 | The device will provide access to respective device packs.
13 |
14 | Description:
15 | None
16 |
17 | *******************************************************************************/
18 |
19 | // DOM-IGNORE-BEGIN
20 | /*******************************************************************************
21 | * Copyright (C) 2018 Microchip Technology Inc. and its subsidiaries.
22 | *
23 | * Subject to your compliance with these terms, you may use Microchip software
24 | * and any derivatives exclusively with Microchip products. It is your
25 | * responsibility to comply with third party license terms applicable to your
26 | * use of third party software (including open source software) that may
27 | * accompany Microchip software.
28 | *
29 | * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
30 | * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
31 | * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
32 | * PARTICULAR PURPOSE.
33 | *
34 | * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
35 | * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
36 | * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
37 | * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
38 | * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN
39 | * ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY,
40 | * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
41 | *******************************************************************************/
42 | // DOM-IGNORE-END
43 |
44 | #include
45 | #include
46 | #include "toolchain_specifics.h"
47 |
48 |
--------------------------------------------------------------------------------
/cutcutgo.X/src/reset.c:
--------------------------------------------------------------------------------
1 | #include "reset.h"
2 |
3 | __attribute__((__noreturn__)) void reset_soft(void)
4 | {
5 | /* Software reset */
6 | SYSKEY = 0x00000000; //write invalid key to force lock
7 | SYSKEY = 0xAA996655; //write key1 to SYSKEY
8 | SYSKEY = 0x556699AA; //write key2 to SYSKEY
9 |
10 | /* set SWRST bit to arm reset */
11 | RSWRSTSET = 1;
12 |
13 | /* read RSWRST register to trigger reset */
14 | unsigned int dummy;
15 | dummy = RSWRST;
16 | dummy++;
17 |
18 | /* prevent any unwanted code execution until reset occurs*/
19 | while(1);
20 | }
--------------------------------------------------------------------------------
/cutcutgo.X/src/reset.h:
--------------------------------------------------------------------------------
1 | /*
2 | * File: reset.h
3 | * Author: virtualabs
4 | *
5 | * Created on 28 septembre 2023, 23:58
6 | */
7 |
8 | #ifndef RESET_H
9 | #define RESET_H
10 |
11 | #include "configuration.h"
12 | #include "definitions.h"
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 | void reset_soft(void);
19 |
20 |
21 | #ifdef __cplusplus
22 | }
23 | #endif
24 |
25 | #endif /* RESET_H */
26 |
27 |
--------------------------------------------------------------------------------
/docs/.nojekyll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/.nojekyll
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line.
5 | SPHINXOPTS =
6 | SPHINXBUILD = sphinx-build
7 | SOURCEDIR = source
8 | BUILDDIR = build
9 |
10 | # Put it first so that "make" without argument is like "make help".
11 | help:
12 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13 |
14 | .PHONY: help Makefile
15 |
16 | # Catch-all target: route all unknown targets to Sphinx using the new
17 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
18 | %: Makefile
19 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
--------------------------------------------------------------------------------
/docs/requirements.txt:
--------------------------------------------------------------------------------
1 | sphinx==5.3.0
2 | sphinx-rtd-theme==1.2.2
--------------------------------------------------------------------------------
/docs/source/_static/documents/CricutMaker-schematics.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/documents/CricutMaker-schematics.pdf
--------------------------------------------------------------------------------
/docs/source/_static/documents/RN4678.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/documents/RN4678.pdf
--------------------------------------------------------------------------------
/docs/source/_static/documents/microchip-pic32mx470F512L.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/documents/microchip-pic32mx470F512L.pdf
--------------------------------------------------------------------------------
/docs/source/_static/documents/pic32mx470-RM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/documents/pic32mx470-RM.pdf
--------------------------------------------------------------------------------
/docs/source/_static/documents/reverse-pcb-release.svg.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/documents/reverse-pcb-release.svg.zip
--------------------------------------------------------------------------------
/docs/source/_static/documents/teardown/microchip-pic32mx470F512L.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/documents/teardown/microchip-pic32mx470F512L.pdf
--------------------------------------------------------------------------------
/docs/source/_static/images/bootloader/app-running.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/bootloader/app-running.png
--------------------------------------------------------------------------------
/docs/source/_static/images/bootloader/buttons-msd-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/bootloader/buttons-msd-on.png
--------------------------------------------------------------------------------
/docs/source/_static/images/bootloader/buttons-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/bootloader/buttons-off.png
--------------------------------------------------------------------------------
/docs/source/_static/images/bootloader/msd-device.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/bootloader/msd-device.png
--------------------------------------------------------------------------------
/docs/source/_static/images/bootloader/msd-programming.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/bootloader/msd-programming.png
--------------------------------------------------------------------------------
/docs/source/_static/images/pcb/ATH-84-100-X12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/pcb/ATH-84-100-X12.jpg
--------------------------------------------------------------------------------
/docs/source/_static/images/pcb/ATH-84-112-X3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/pcb/ATH-84-112-X3.jpg
--------------------------------------------------------------------------------
/docs/source/_static/images/pcb/ATH-84-113-X1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/pcb/ATH-84-113-X1.jpg
--------------------------------------------------------------------------------
/docs/source/_static/images/pcb/SCM-84-100-X7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/pcb/SCM-84-100-X7.jpg
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/connect-snap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/connect-snap.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/cutting-hole.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/cutting-hole.jpg
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/debug-connector.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/debug-connector.jpg
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/debug-pcb-installed.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/debug-pcb-installed.jpg
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/inkcut-device-connection-cmds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/inkcut-device-connection-cmds.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/inkcut-device-connection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/inkcut-device-connection.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/inkcut-device-output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/inkcut-device-output.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/inkcut-device-protocol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/inkcut-device-protocol.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/inkcut-device-setup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/inkcut-device-setup.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/microchip-snap.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/microchip-snap.jpg
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/mplab-ipe-first-step.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/mplab-ipe-first-step.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/mplab-ipe-fourth-step.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/mplab-ipe-fourth-step.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/mplab-ipe-second-step.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/mplab-ipe-second-step.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/mplab-ipe-third-step.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/mplab-ipe-third-step.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/mplabx_build_flash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/mplabx_build_flash.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/plot-margin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/plot-margin.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/screenshot_doc_properties.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/screenshot_doc_properties.png
--------------------------------------------------------------------------------
/docs/source/_static/images/setup/screenshot_of_send_to_cricut.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/setup/screenshot_of_send_to_cricut.png
--------------------------------------------------------------------------------
/docs/source/_static/images/teardown/X-axis-reduction-gears.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/teardown/X-axis-reduction-gears.jpg
--------------------------------------------------------------------------------
/docs/source/_static/images/teardown/Y-axis-reduction-gears.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/teardown/Y-axis-reduction-gears.jpg
--------------------------------------------------------------------------------
/docs/source/_static/images/teardown/pcb-breakout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/teardown/pcb-breakout.png
--------------------------------------------------------------------------------
/docs/source/_static/images/teardown/servo-motor.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/teardown/servo-motor.webp
--------------------------------------------------------------------------------
/docs/source/_static/images/teardown/x-axis-mechanical.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/docs/source/_static/images/teardown/x-axis-mechanical.jpg
--------------------------------------------------------------------------------
/docs/source/config.rst:
--------------------------------------------------------------------------------
1 | Configuring CutcutGo
2 | ====================
3 |
4 | .. warning::
5 |
6 | Make sure to reprogram the micro-controller of your Cricut Maker before following these
7 | instructions ! See :ref:`firmware_flashing` for more details.
8 |
9 | Installing InkCut
10 | -----------------
11 |
12 | We slightly modified the InkCut project in order to add support for the Cricut Maker. Our modified version can
13 | be found in our dedicated `InkCut repository `_.
14 |
15 | Install *InkCut* with the following commands (Debian-like machine):
16 |
17 | .. code:: text
18 |
19 | $ git clone https://github.com/virtualabs/inkcut-cutcutgo.git && cd inkcut-cutcutgo
20 | $ sudo apt install python3-pip python3-pyqt5 python3-setuptools libcups2-dev python3-pyqt5.qtsvg
21 | $ sudo pip install .
22 |
23 |
24 | Configuring InkCut
25 | ------------------
26 |
27 | Launch *InkCut* and go straight to the *Device Setup* menu. Add a new device and select the `Cricut Maker Champagne`
28 | type. Once done, edit the device settings starting with the *Connection* tab. Use the following settings:
29 |
30 | .. image:: _static/images/setup/inkcut-device-connection.png
31 | :width: 800
32 | :alt: Cricut Maker connection settings for InkCut (connection tab)
33 |
34 | Go to the *Protocol* tab, and select the *GCODE* protocol. Untick the *Use builtin and startup commands* option,
35 | set the decimal precision to `4` and set the lift mode to `Custom`. Set the raise GCODE to `G01Z0F10` and the lower
36 | GCODE to `G01Z-10F10`. These are GCODE commands used to raise and lower the tool heads.
37 |
38 | .. image:: _static/images/setup/inkcut-device-protocol.png
39 | :width: 800
40 | :alt: Cricut Maker connection settings for InkCut (protocol tab)
41 |
42 | Go to the *Device* tab and then to the *Connection commands* vertical sub-tab in order to set the following
43 | commands in the *after connect* text box:
44 |
45 | .. code:: text
46 |
47 | T0 ; home tool A
48 | $H
49 | T1 ; home tool B
50 | $H
51 |
52 | T0 ;select tool
53 | G21
54 | G01X0Y0F10
55 |
56 | Use `T1` to automatically select the B tool, or `T0` to use the A tool.
57 |
58 | .. image:: _static/images/setup/inkcut-device-connection-cmds.png
59 | :width: 800
60 | :alt: Cricut Maker connection settings for InkCut (connection commands)
61 |
62 | Last, go to the device *Output* vertical sub-tab and set the X and Y scale to `0.2`.
63 |
64 | Your device is ready to draw/cut !
65 |
66 |
67 | Cut your first design !
68 | -----------------------
69 |
70 | Select a SVG file, load it into *InkCut* and make sure to have set a left margin in the *Material* tab
71 | of at least 40mm (this measure has not already been precisely determined yet).
72 |
73 | Click on the *Device* menu and then *Send to device*. *InkCut* will connect to the Cricut Maker and send
74 | GCODE. The Cricut Maker is expected to home all axes (X and Z) and then start cutting/drawing depending on
75 | the selected tool.
--------------------------------------------------------------------------------
/docs/source/index.rst:
--------------------------------------------------------------------------------
1 | .. CutcutGo documentation master file, created by
2 | sphinx-quickstart on Fri Jun 23 10:45:30 2023.
3 | You can adapt this file completely to your liking, but it should at least
4 | contain the root `toctree` directive.
5 |
6 | Welcome to CutcutGo's documentation!
7 | ====================================
8 |
9 | .. toctree::
10 | :maxdepth: 2
11 | :caption: Contents:
12 |
13 | intro.rst
14 | teardown.rst
15 | setup.rst
16 | inkscape.rst
17 | tech.rst
18 |
--------------------------------------------------------------------------------
/docs/source/inkscape.rst:
--------------------------------------------------------------------------------
1 | Configuring CutcutGo
2 | ====================
3 |
4 | .. warning::
5 |
6 | Make sure to reprogram the micro-controller of your Cricut Maker before following these
7 | instructions ! See :ref:`firmware_flashing` for more details.
8 |
9 | Introducing Inkscape-CutcutGo
10 | -----------------------------
11 |
12 | `Inkscape-CutcutGo `_ is a fork
13 | of an existing Inkscape extension called
14 | `Inkscape-Silhouette `_, written
15 | by Jürgen Weigert (juergen@fabmail.org) and other contributors.
16 |
17 | This extension has been heavily modified to fit Cricut's Maker features, but only
18 | supports Cricut's *Fine Point blades* and pens at the moment.
19 |
20 | Install Inkscape-CutcutGo
21 | ^^^^^^^^^^^^^^^^^^^^^^^^^
22 |
23 | Follow `Inkscape-CutcutGo installation instructions `_
24 | to download and install this extension into your Inkscape software.
25 |
26 |
27 | Configure Inkscape to fit the cutting mat
28 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29 |
30 | .. image:: _static/images/setup/screenshot_doc_properties.png
31 | :width: 800
32 | :alt: Inkscape document properties for Cricut Maker 1 compatibility
33 |
34 | 1. Click the `File` menu and then the `Document properties` menu entry
35 | 2. Set the current document width and height to `304.8` millimeters (12" cutting mat)
36 | 3. Close the dialog window
37 |
38 |
39 | Plot a path (or a series of paths)
40 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41 |
42 | .. image:: _static/images/setup/screenshot_of_send_to_cricut.png
43 | :width: 800
44 | :alt: Send to cricut export feature
45 |
46 | 1. Open your document with inkscape.
47 | - Note: documents in px are plotted at 96dpi
48 |
49 | 2. Convert text objects to paths (Path - Convert object to path)
50 | 3. Select the parts you want to plot.
51 | 4. Open the extension. If you want to use the same cut settings for all of the paths in your file, use "Extensions -> Export -> Send to Cricut"
52 | 5. Set your desired plot parameters. There are numerous aspects you can control with the dialog, here are just the core highlights:
53 | - **X-Offset, Y-Offset** An additional offset of your drawing from the top left corner. Default is 0/0
54 | - **Tool** *Fine-point blade* mode drews small circles for orientation of the blade, Pen mode draws exactly as given.
55 | - **Media** Select a predfined media. For now, only "Laser Copy Paper" ,aterial is supported.
56 |
57 | 6. To start the cut, in "Send to Cricut, click the "Apply" button. If *preview* option has been selected, click the "Cut" button in the next dialog box to start cutting.
58 |
59 |
--------------------------------------------------------------------------------
/docs/source/intro.rst:
--------------------------------------------------------------------------------
1 | Introducing CutcutGo
2 | ====================
3 |
4 | Origin
5 | ------
6 |
7 | In 2021, Cricut unilateraly decided to restrict the number of designs for users that did not subscribe
8 | to the Cricut Access platform. Cricut machines are quite expensive, as well as their accessories, and
9 | a huge number of users were furious about this decision. Hopefully, Cricut walked back and subscription
10 | is no more mandatory but a bit too late: some of them decided to develop an open-source firmware for
11 | one of the mose common Cricut machine in order to set it free. Months later, I started to port GRBL onto
12 | the Cricut Maker after having reverse-engineered its main printed circuit board.
13 |
14 | Why GRBL ?
15 | ----------
16 |
17 | I did not want to start from scratch and `GRBL `_ is a well-known implementation
18 | of a GCODE-compatible CNC firmware for the AVR platform that simply works. I had a look at Marlin too, but it
19 | looked like a huge project to jump into, far more complex than GRBL. Even if GRBL has not been ported to PIC32,
20 | this task seemed to be feasible and this is why I chose to derive this CutcutGo firmware from GRBL.
21 |
22 | Moreover, the whole code is in C and I know C better than C++ :D.
23 |
24 | Months of development
25 | ---------------------
26 |
27 | The implementation of this firmware has been regularly streamed on `my Twitch channel `_
28 | and is now available on my `Peertube channel `_, if you are eager to know how long it took to get there and what different
29 | issues I had to face.
30 |
31 |
32 | Current status of this project
33 | ------------------------------
34 |
35 | This firmware open-source firmware is currently able to drive a Cricut Maker through GCODE without
36 | issue, supporting both tools (A & B). It is still experimental as a lot of features have still
37 | to be added to this implementation, but the hardest part is done.
38 |
39 | `Here is a video showing the latest tests we made `_.
40 |
41 |
42 |
--------------------------------------------------------------------------------
/docs/source/teardown.rst:
--------------------------------------------------------------------------------
1 | Teardown of the Cricut Maker Champagne
2 | ======================================
3 |
4 | A low-cost CNC plotter
5 | ----------------------
6 |
7 | The Cricut Maker seems to be a low-cost CNC plotter/cutter using cheap parts (servo motors, gears) but
8 | relying on a strong metallic frame. Most of the plastic parts are injection-molded but somehow standards.
9 |
10 | It does not use any ball bearing but some self-lubricating rings instead (for cost reduction).
11 |
12 | Main PCB breakdown
13 | ------------------
14 |
15 | .. image:: _static/images/teardown/pcb-breakout.png
16 | :width: 800
17 | :alt: Cricut Maker Champagne PCB breakout
18 |
19 | The above PCB breakdown is from a Maker Champagne and contains
20 | the following components:
21 |
22 | * A PIC32 micro-controller (**MCU**)
23 | * A set of DC motor drivers (**X/Y drivers**, **Head drivers**)
24 | * A set of JST connectors to X/Y motors (**X/Y motors** and **X/Y sensors**)
25 | * A power stage with regulators and a barrel jack connector (**Power**)
26 | * A USB female connector used as the main communication channel with the host (**Main USB interface**)
27 | * A connector for the cutting/tracing head (**Head conn.**)
28 | * A bluetooth low energy module (**Bluetooth module**)
29 | * A connector for the top LEDs and buttons PCB (**LEDs/buttons**)
30 | * A debugging/programming connector (not populated, **Debug/Prog**)
31 |
32 | PIC32 micro-controller
33 | ----------------------
34 |
35 | This main PCB uses a PIC32MX-family micro-controller, namely a *PIC32MX470F512L*.
36 | This is a 32-bit MCU with up to 512 KB of Flash memory and 128 KB of SRAM.
37 |
38 | The datasheet is available `here <_static/documents/teardown/microchip-pic32mx470F512L.pdf>`_
39 |
40 | Servo motors
41 | ------------
42 |
43 | This Cricut Maker Champagne uses a set of servo motors using a quadrature encoder.
44 | The markings have been used to find out `the exact model used `_.
45 |
46 | .. image:: _static/images/teardown/servo-motor.webp
47 | :width: 400
48 | :alt: "Johnson" HC385MG-based servo-motor
49 |
50 | This is basically a DC motor coupled with a quadrature encoder,
51 | which is less precise than a stepper motor (like a NEMA17).
52 |
53 |
54 | Bluetooth Low Energy module
55 | ---------------------------
56 |
57 | The Cricut Maker relies on a Microchip *RN4678* Bluetooth/Bluetooth LE module driven by a dedicated
58 | UART interface. **This module interface has not been totally reversed yet**.
59 |
60 | The datasheet of this module is `available here <_static/documents/rn4678.pdf>`_
61 |
62 | Mechanical details
63 | ------------------
64 |
65 | X axis is driven through a set of reduction gears coupled to a belt that drives the tool head.
66 |
67 | .. image:: _static/images/teardown/x-axis-mechanical.jpg
68 | :width: 600
69 | :alt: Mechanical interface with the tool head (X axis)
70 |
71 | .. image:: _static/images/teardown/X-axis-reduction-gears.jpg
72 | :width: 600
73 | :alt: X axis reduction gears
74 |
75 | The machine
76 | Y axis however, is driven only by a set of reduction gears and drive rollers.
77 |
78 | .. image:: _static/images/teardown/Y-axis-reduction-gears.jpg
79 | :width: 600
80 | :alt: Y axis reduction gears
81 |
--------------------------------------------------------------------------------
/docs/source/tech.rst:
--------------------------------------------------------------------------------
1 | Technical resources
2 | ===================
3 |
4 | This section provides some technical resources we used to understand how Cricut
5 | designed its Maker (v1) and how the micro-controller is supposed to drive all
6 | its peripherals.
7 |
8 | Cricut Maker Reverse-engineering
9 | --------------------------------
10 |
11 | * `Reversed PCB schematics (PDF) <_static/documents/CricutMaker-schematics.pdf>`_
12 | * `Reversed tracks & vias (SVG, zipped) <_static/documents/reverse-pcb-release.svg.zip>`_
13 |
14 | Datasheets
15 | ----------
16 |
17 | * `Microchip PIC32MX470F512L Datasheet <_static/documents/microchip-pic32mx470F512L.pdf>`_
18 | * `Microchip PIC32MX470F512L Reference Manual <_static/documents/pic32mx470-RM.pdf>`_
19 | * `Microchip RN4678 Bluetooth Dual Mode (BR/EDR/LE) module <_static/documents/RN4678.pdf>`_
--------------------------------------------------------------------------------
/schematics/CricutMaker-schematics.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/virtualabs/cutcutgo/972f5706456da10c05fa6dd795904703919c5edd/schematics/CricutMaker-schematics.pdf
--------------------------------------------------------------------------------
/utils/cutcutgo_mkuf2.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | FAMILY_ID='0x4d414b52'
4 | APP_BASE_ADDR='0x1d010000'
5 | CCG_BL_HEX='../cutcutgo.X/dist/cutcutgo_bl/production/cutcutgo.X.production.hex'
6 | CCG_BL_BIN='../cutcutgo.X/dist/cutcutgo_bl/production/cutcutgo-app.bin'
7 | CCG_BL_UF2='../release/Cutcutgo-app.uf2'
8 |
9 | # Make sure our hex file exists
10 | if [ -f "$CCG_BL_HEX" ]; then
11 | # Convert hex file into bin
12 | objcopy -Iihex -Obinary $CCG_BL_HEX $CUTCUTH $CCG_BL_BIN
13 | ./uf2conv.py -c -f $FAMILY_ID -b $APP_BASE_ADDR -o $CCG_BL_UF2 $CCG_BL_BIN
14 | fi
15 |
--------------------------------------------------------------------------------