mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-18 03:14:42 +00:00
Moved SerialUPDI sources to correct location
This commit is contained in:
55
src/updi_state.c
Normal file
55
src/updi_state.c
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* avrdude - A Downloader/Uploader for AVR device programmers
|
||||
* Copyright (C) 2021 Dawid Buchwald
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
/*
|
||||
* Based on pymcuprog
|
||||
* See https://github.com/microchip-pic-avr-tools/pymcuprog
|
||||
*/
|
||||
|
||||
#include "ac_cfg.h"
|
||||
|
||||
#include "libavrdude.h"
|
||||
#include "updi_state.h"
|
||||
|
||||
updi_sib_info* updi_get_sib_info(PROGRAMMER * pgm)
|
||||
{
|
||||
return &((updi_state *)(pgm->cookie))->sib_info;
|
||||
}
|
||||
|
||||
updi_datalink_mode updi_get_datalink_mode(PROGRAMMER * pgm)
|
||||
{
|
||||
return ((updi_state *)(pgm->cookie))->datalink_mode;
|
||||
}
|
||||
|
||||
void updi_set_datalink_mode(PROGRAMMER * pgm, updi_datalink_mode mode)
|
||||
{
|
||||
((updi_state *)(pgm->cookie))->datalink_mode = mode;
|
||||
}
|
||||
|
||||
updi_nvm_mode updi_get_nvm_mode(PROGRAMMER * pgm)
|
||||
{
|
||||
return ((updi_state *)(pgm->cookie))->nvm_mode;
|
||||
}
|
||||
|
||||
void updi_set_nvm_mode(PROGRAMMER * pgm, updi_nvm_mode mode)
|
||||
{
|
||||
((updi_state *)(pgm->cookie))->nvm_mode = mode;
|
||||
}
|
||||
Reference in New Issue
Block a user